mirror of
https://github.com/nextcloud/server.git
synced 2026-06-08 00:02:54 -04:00
Merge pull request #30590 from nextcloud/backport/30571/stable21
[stable21] fix: only use jquery once it is available
This commit is contained in:
commit
2e61727e96
1 changed files with 11 additions and 10 deletions
|
|
@ -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');
|
||||
}
|
||||
});
|
||||
|
|
|
|||
Loading…
Reference in a new issue