summaryrefslogtreecommitdiff
path: root/ext/bg/js/settings2/sentence-termination-characters-controller.js
diff options
context:
space:
mode:
authortoasted-nutbread <toasted-nutbread@users.noreply.github.com>2021-01-19 20:52:57 -0500
committerGitHub <noreply@github.com>2021-01-19 20:52:57 -0500
commitccf28ed055f08d38d28b19025d10cb4e7424464b (patch)
tree32c40a92149415c54ffd51b7868ae24d468cbaaa /ext/bg/js/settings2/sentence-termination-characters-controller.js
parent3c51bf2a0be7c35f86d2da8c381453b95e6414bf (diff)
Menu refactor (#1277)
* Rename menuOpened event to menuOpen * Rename menuClosed event to menuClose * Rename close event * Assign _isClosed * Reuse event detail * Expose PopupMenu.openMenus * Rename and expose properties * Add cancelable argument to close * Update menuOpen detail * Update menuClose detail
Diffstat (limited to 'ext/bg/js/settings2/sentence-termination-characters-controller.js')
-rw-r--r--ext/bg/js/settings2/sentence-termination-characters-controller.js7
1 files changed, 3 insertions, 4 deletions
diff --git a/ext/bg/js/settings2/sentence-termination-characters-controller.js b/ext/bg/js/settings2/sentence-termination-characters-controller.js
index 1e055f40..d62771ec 100644
--- a/ext/bg/js/settings2/sentence-termination-characters-controller.js
+++ b/ext/bg/js/settings2/sentence-termination-characters-controller.js
@@ -182,7 +182,7 @@ class SentenceTerminationCharacterEntry {
this._eventListeners.addEventListener(typeSelect, 'change', this._onTypeSelectChange.bind(this), false);
this._eventListeners.addEventListener(character1Input, 'change', this._onCharacterChange.bind(this, 1), false);
this._eventListeners.addEventListener(character2Input, 'change', this._onCharacterChange.bind(this, 2), false);
- this._eventListeners.addEventListener(menuButton, 'menuClosed', this._onMenuClosed.bind(this), false);
+ this._eventListeners.addEventListener(menuButton, 'menuClose', this._onMenuClose.bind(this), false);
}
cleanup() {
@@ -208,9 +208,8 @@ class SentenceTerminationCharacterEntry {
this._setCharacterValue(node, characterNumber, value);
}
- _onMenuClosed(e) {
- const {detail: {action}} = e;
- switch (action) {
+ _onMenuClose(e) {
+ switch (e.detail.action) {
case 'delete':
this._delete();
break;