summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVincent Petry <pvince81@owncloud.com>2013-10-07 13:25:30 +0200
committerVincent Petry <pvince81@owncloud.com>2013-10-07 13:26:46 +0200
commite97aaee1aac6ab81d404e264b86b65357bda96ac (patch)
tree7aceee089ad32d82e9d8f2a3133b0ae02a596595
parent68fbd7b92241daf1326c9a95331d4fdb5ca030e6 (diff)
downloadnextcloud-server-e97aaee1aac6ab81d404e264b86b65357bda96ac.tar.gz
nextcloud-server-e97aaee1aac6ab81d404e264b86b65357bda96ac.zip
Prevent share dropdown to close too early with autocomplete
When clicking on an autocomplete result in the sharing dropdown, it will mistakenly be detected as being clicked outside and would trigger the sharing dropdown closing. This fix adds a check to detect clicks inside the autocomplete and prevent closing the dropdown in that case. This fixes #4142
-rw-r--r--core/js/share.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/core/js/share.js b/core/js/share.js
index c0ecbbf36cf..b472797b3cd 100644
--- a/core/js/share.js
+++ b/core/js/share.js
@@ -476,7 +476,7 @@ $(document).ready(function() {
$(this).click(function(event) {
var target = $(event.target);
var isMatched = !target.is('.drop, .ui-datepicker-next, .ui-datepicker-prev, .ui-icon')
- && !target.closest('#ui-datepicker-div').length;
+ && !target.closest('#ui-datepicker-div').length && !target.closest('.ui-autocomplete').length;
if (OC.Share.droppedDown && isMatched && $('#dropdown').has(event.target).length === 0) {
OC.Share.hideDropDown();
}