aboutsummaryrefslogtreecommitdiff
path: root/ext/bg/js/settings/keyboard-mouse-input-field.js
diff options
context:
space:
mode:
authortoasted-nutbread <toasted-nutbread@users.noreply.github.com>2020-10-31 16:26:01 -0400
committerGitHub <noreply@github.com>2020-10-31 16:26:01 -0400
commit21cae0e38ef15658205db41dd988e53deb76da8b (patch)
treea71579d0333646ad86cace7ae715e2a63b5f8575 /ext/bg/js/settings/keyboard-mouse-input-field.js
parentab98caf84226bf56e9d80b6ec3fe752b4d324bf8 (diff)
Scan inputs controller refactor (#975)
* Add public function to clear inputs * Return the promise * Pass input options directly * Assign showAdvanced * Add more menu options
Diffstat (limited to 'ext/bg/js/settings/keyboard-mouse-input-field.js')
-rw-r--r--ext/bg/js/settings/keyboard-mouse-input-field.js6
1 files changed, 5 insertions, 1 deletions
diff --git a/ext/bg/js/settings/keyboard-mouse-input-field.js b/ext/bg/js/settings/keyboard-mouse-input-field.js
index f05de4a7..f9c6dfcd 100644
--- a/ext/bg/js/settings/keyboard-mouse-input-field.js
+++ b/ext/bg/js/settings/keyboard-mouse-input-field.js
@@ -77,6 +77,10 @@ class KeyboardMouseInputField extends EventDispatcher {
this._penPointerIds.clear();
}
+ clearInputs() {
+ this._updateInputs([]);
+ }
+
// Private
_splitValue(value) {
@@ -169,7 +173,7 @@ class KeyboardMouseInputField extends EventDispatcher {
switch (key) {
case 'Escape':
case 'Backspace':
- this._updateInputs([]);
+ this.clearInputs();
break;
default:
this._addInputs(this._getModifierKeys(e));