Merge pull request #7598 from nextcloud/fix-closing-menu-on-second-click-in-sharing-page
Fix closing menu on second click in sharing page
This commit is contained in:
commit
588b0085dd
|
@ -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');
|
||||
}
|
||||
});
|
||||
|
|
Loading…
Reference in New Issue