diff options
author | John Molakvoæ <skjnldsv@users.noreply.github.com> | 2022-01-10 20:03:21 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-01-10 20:03:21 +0100 |
commit | 5faba45e6343455f6e3471dbf9a9d116ed679058 (patch) | |
tree | b8c756e5d90c6beeca88509d0669423fb9cc1fcf /core | |
parent | 92e60caa866718aaff8516b0fd3dc490c83499d1 (diff) | |
parent | 94554c4c0dab87260658acb331e1e9db54ecc584 (diff) | |
download | nextcloud-server-5faba45e6343455f6e3471dbf9a9d116ed679058.tar.gz nextcloud-server-5faba45e6343455f6e3471dbf9a9d116ed679058.zip |
Merge pull request #30571 from nextcloud/fix/missing-jquery
Diffstat (limited to 'core')
-rw-r--r-- | core/js/public/publicpage.js | 21 |
1 files changed, 11 insertions, 10 deletions
diff --git a/core/js/public/publicpage.js b/core/js/public/publicpage.js index f74cba669ed..7cca96e1d01 100644 --- a/core/js/public/publicpage.js +++ b/core/js/public/publicpage.js @@ -31,16 +31,17 @@ window.addEventListener('DOMContentLoaded', function () { $('#remote_address').focus(); }); -}); -$(document).mouseup(function(e) { - var toggle = $('#body-public').find('.header-right .menutoggle'); - var container = toggle.next('.popovermenu'); + $(document).mouseup(function(e) { + var toggle = $('#body-public').find('.header-right .menutoggle'); + var container = toggle.next('.popovermenu'); + + // 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'); + } + }); - // 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'); - } }); |