From 06d00af9f89d9c858b6f7a3fb11de85d4da8d6fc Mon Sep 17 00:00:00 2001 From: Victor Dubiniuk Date: Mon, 8 Oct 2012 22:03:16 +0300 Subject: [PATCH] Prevent closing sharing dialog on month adjustment. Fixes oc-1884 --- core/js/share.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/core/js/share.js b/core/js/share.js index 75448bfe20..ab6708c7c1 100644 --- a/core/js/share.js +++ b/core/js/share.js @@ -370,7 +370,10 @@ $(document).ready(function() { }); $(this).click(function(event) { - if (OC.Share.droppedDown && !($(event.target).hasClass('drop')) && $('#dropdown').has(event.target).length === 0) { + var target = $(event.target); + var isMatched = !target.hasClass('drop') && !target.hasClass('ui-datepicker-next') + && !target.hasClass('ui-datepicker-prev') && !target.hasClass('ui-icon'); + if (OC.Share.droppedDown && isMatched && $('#dropdown').has(event.target).length === 0) { OC.Share.hideDropDown(); } });