diff --git a/js/directive/appPopoverMenuUtils.js b/js/directive/appPopoverMenuUtils.js index 94416362e..67ccb14d6 100644 --- a/js/directive/appPopoverMenuUtils.js +++ b/js/directive/appPopoverMenuUtils.js @@ -27,15 +27,17 @@ app.directive('appPopoverMenuUtils', function () { link: function (scope, elm) { var menu = elm.find('.popovermenu'); var button = elm.find('button'); - button.click(function () { + button.click(function (e) { menu.toggleClass('hidden'); if(!menu.hasClass('hidden')) { button.css('display','block'); } else { button.css('display',''); } - }); + e.stopPropagation(); + }); scope.$on('documentClicked', function (scope, event) { + e.stopPropagation(); if (event.target !== button) { menu.addClass('hidden'); } diff --git a/js/public/app.js b/js/public/app.js index c05ac479d..7bf7558e9 100644 --- a/js/public/app.js +++ b/js/public/app.js @@ -655,15 +655,17 @@ app.directive('appPopoverMenuUtils', function () { link: function (scope, elm) { var menu = elm.find('.popovermenu'); var button = elm.find('button'); - button.click(function () { + button.click(function (e) { menu.toggleClass('hidden'); if(!menu.hasClass('hidden')) { button.css('display','block'); } else { button.css('display',''); } - }); + e.stopPropagation(); + }); scope.$on('documentClicked', function (scope, event) { + e.stopPropagation(); if (event.target !== button) { menu.addClass('hidden'); } diff --git a/templates/part.board.mainView.php b/templates/part.board.mainView.php index eacf28c4e..6161450d8 100644 --- a/templates/part.board.mainView.php +++ b/templates/part.board.mainView.php @@ -59,9 +59,7 @@
- +