Fix nextcloud navbar by hiding menu when clicking outside

This doesn't fix when clicking files app + button.
Simó Albert i Beltran 2021-07-22 10:42:33 +02:00
parent bef6958ffb
commit 15a1d577fb
1 changed files with 9 additions and 0 deletions

View File

@ -12,4 +12,13 @@ jQuery(document).ready(() => {
$('#dropdownMenuApps').toggle()
})
})
$(window).click( (event) => {
if (
!$(event.target).parents(
'#dropdownMenuAppsButton, #dropdownMenuApps'
).length
) {
$('#dropdownMenuApps').hide()
}
})
})