diff options
author | toasted-nutbread <toasted-nutbread@users.noreply.github.com> | 2021-03-27 13:21:34 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-03-27 13:21:34 -0400 |
commit | 422f011facc4beba59bbe66a80bcc6aeb3648c6b (patch) | |
tree | e161151d76895b283e33b3bcbb7ca21b9cb6a5b2 /ext/js/dom/popup-menu.js | |
parent | af768624ac3a08dad11ceed3f009e942a84323af (diff) |
Update hotkey settings design (#1564)
* Update PopupMenu event prevention
* Use vars for button padding
* Add button-inner-label style
* Add input-button button
* Update display of scope selection
* Add hidden argument text input field
* Remove unnecessary calls
* Display a strike through the enabled button when no scopes are selected
Diffstat (limited to 'ext/js/dom/popup-menu.js')
-rw-r--r-- | ext/js/dom/popup-menu.js | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/ext/js/dom/popup-menu.js b/ext/js/dom/popup-menu.js index af076baa..d8c75869 100644 --- a/ext/js/dom/popup-menu.js +++ b/ext/js/dom/popup-menu.js @@ -86,17 +86,19 @@ class PopupMenu extends EventDispatcher { _onMenuContainerClick(e) { if (e.currentTarget !== e.target) { return; } - e.stopPropagation(); - e.preventDefault(); - this._close(null, 'outside', true, e); + if (this._close(null, 'outside', true, e)) { + e.stopPropagation(); + e.preventDefault(); + } } _onMenuItemClick(e) { const item = e.currentTarget; if (item.disabled) { return; } - e.stopPropagation(); - e.preventDefault(); - this._close(item, 'item', true, e); + if (this._close(item, 'item', true, e)) { + e.stopPropagation(); + e.preventDefault(); + } } _onWindowResize() { |