summaryrefslogtreecommitdiffstats
path: root/apps
diff options
context:
space:
mode:
authorMorris Jobke <hey@morrisjobke.de>2018-01-02 15:11:30 +0100
committerGitHub <noreply@github.com>2018-01-02 15:11:30 +0100
commit588b0085dd023932e15599713851251914d3a2b9 (patch)
tree80415695687be60b91b3b11ebd40042216485b1a /apps
parentd97341d986955777a666cc8b13213b544a8b072d (diff)
parent372e7acfafafaf58b6e4abdaaf13fddf2948090a (diff)
downloadnextcloud-server-588b0085dd023932e15599713851251914d3a2b9.tar.gz
nextcloud-server-588b0085dd023932e15599713851251914d3a2b9.zip
Merge pull request #7598 from nextcloud/fix-closing-menu-on-second-click-in-sharing-page
Fix closing menu on second click in sharing page
Diffstat (limited to 'apps')
-rw-r--r--apps/files_sharing/js/public.js7
1 files changed, 5 insertions, 2 deletions
diff --git a/apps/files_sharing/js/public.js b/apps/files_sharing/js/public.js
index 2142dec1218..ae19500080b 100644
--- a/apps/files_sharing/js/public.js
+++ b/apps/files_sharing/js/public.js
@@ -434,10 +434,13 @@ $(document).ready(function () {
$(document).mouseup(function(e) {
+ var toggle = $('#share-menutoggle');
var container = $('#share-menu');
- // if the target of the click isn't the container nor a descendant of the container
- if (!container.is(e.target) && container.has(e.target).length === 0) {
+ // if the target of the click isn't the menu toggle, nor a descendant of the
+ // menu toggle, nor the container nor a descendant of the container
+ if (!toggle.is(e.target) && toggle.has(e.target).length === 0 &&
+ !container.is(e.target) && container.has(e.target).length === 0) {
container.removeClass('open');
}
});