diff --git a/view/theme/dispy-dark/theme.php b/view/theme/dispy-dark/theme.php index 0134b1f91b..b57971db96 100644 --- a/view/theme/dispy-dark/theme.php +++ b/view/theme/dispy-dark/theme.php @@ -73,6 +73,15 @@ $(document).ready(function() { $('#nav-notifications-linkmenu').click(function(event) { event.stopPropagation(); }); + // click outside profiles menu closes it + $('html').click(function() { + $('#profiles-menu-trigger').removeClass('selected'); + document.getElementById("profiles-menu").style.display = "none"; + }); + + $('#profiles-menu').click(function(event) { + event.stopPropagation(); + }); // main function in toolbar functioning function toggleToolbar() { diff --git a/view/theme/dispy/theme.php b/view/theme/dispy/theme.php index ac97948a38..9f0fcba828 100644 --- a/view/theme/dispy/theme.php +++ b/view/theme/dispy/theme.php @@ -73,6 +73,15 @@ $(document).ready(function() { $('#nav-notifications-linkmenu').click(function(event) { event.stopPropagation(); }); + // click outside profiles menu closes it + $('html').click(function() { + $('#profiles-menu-trigger').removeClass('selected'); + document.getElementById("profiles-menu").style.display = "none"; + }); + + $('#profiles-menu').click(function(event) { + event.stopPropagation(); + }); // main function in toolbar functioning function toggleToolbar() {