mirror of
https://github.com/phpbb/phpbb.git
synced 2025-07-25 11:01:48 +02:00
[ticket/11552] Hide other popups when menu is toggled
PHPBB3-11552
This commit is contained in:
@@ -560,6 +560,7 @@ function insert_single_user(formId, user)
|
||||
});
|
||||
|
||||
if ($this.height() <= maxHeight) {
|
||||
toggle.removeClass('visible');
|
||||
menu.hide();
|
||||
return;
|
||||
}
|
||||
@@ -581,6 +582,11 @@ function insert_single_user(formId, user)
|
||||
|
||||
toggle.click(function() {
|
||||
if (!responsive) return;
|
||||
if (!toggle.hasClass('visible')) {
|
||||
// Hide other popups
|
||||
$('.responsive-menu.visible').removeClass('visible').find('.responsive-popup').hide();
|
||||
}
|
||||
toggle.toggleClass('visible');
|
||||
menu.toggle();
|
||||
});
|
||||
|
||||
@@ -589,10 +595,8 @@ function insert_single_user(formId, user)
|
||||
});
|
||||
|
||||
$('#phpbb').click(function(e) {
|
||||
var target = $(e.target);
|
||||
|
||||
if (!target.parents().is('.responsive-menu')) {
|
||||
$('.responsive-popup').hide();
|
||||
if (!$(e.target).parents().is('.responsive-menu.visible')) {
|
||||
$('.responsive-menu.visible').removeClass('visible').find('.responsive-popup').hide();
|
||||
}
|
||||
});
|
||||
});
|
||||
|
Reference in New Issue
Block a user