aboutsummaryrefslogtreecommitdiff
path: root/ext/mixed/js/popup-menu.js
diff options
context:
space:
mode:
Diffstat (limited to 'ext/mixed/js/popup-menu.js')
-rw-r--r--ext/mixed/js/popup-menu.js4
1 files changed, 4 insertions, 0 deletions
diff --git a/ext/mixed/js/popup-menu.js b/ext/mixed/js/popup-menu.js
index 124c1984..9ad4e260 100644
--- a/ext/mixed/js/popup-menu.js
+++ b/ext/mixed/js/popup-menu.js
@@ -76,12 +76,16 @@ class PopupMenu extends EventDispatcher {
_onMenuContainerClick(e) {
if (e.currentTarget !== e.target) { return; }
+ e.stopPropagation();
+ e.preventDefault();
this._close(null, 'outside', true);
}
_onMenuItemClick(e) {
const item = e.currentTarget;
if (item.disabled) { return; }
+ e.stopPropagation();
+ e.preventDefault();
this._close(item, 'item', true);
}