summaryrefslogtreecommitdiff
path: root/ext/mixed/js/popup-menu.js
diff options
context:
space:
mode:
authortoasted-nutbread <toasted-nutbread@users.noreply.github.com>2021-01-23 21:13:01 -0500
committerGitHub <noreply@github.com>2021-01-23 21:13:01 -0500
commitef577b88754523abeab3844115506a0b6e914874 (patch)
tree78f181897afc89904f2df7c3370030a955219c5b /ext/mixed/js/popup-menu.js
parent9fbdb9757b22c2bb9afe5061137bfe4b3b755e91 (diff)
Audio button menu (#1302)
* Fix popup menus not stoping events * Ensure non-stale use of buttons * Enable popup menus on the popup/search pages * Add audio menu
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);
}