aboutsummaryrefslogtreecommitdiff
path: root/ext/js/pages/settings/keyboard-mouse-input-field.js
diff options
context:
space:
mode:
authortoasted-nutbread <toasted-nutbread@users.noreply.github.com>2024-02-18 08:11:47 -0500
committerGitHub <noreply@github.com>2024-02-18 13:11:47 +0000
commitcfc65c31313731dfa0d36c2eceaca35e9d50992f (patch)
treeec96ec7ab1c3dae559fe5d7930c186347fb64a25 /ext/js/pages/settings/keyboard-mouse-input-field.js
parent6cf38229b54efbbc3ae7bc174c3999f9dfa7b1d2 (diff)
Refactor DocumentUtil (#706)
* Refactor DocumentUtil * Isolate suppression
Diffstat (limited to 'ext/js/pages/settings/keyboard-mouse-input-field.js')
-rw-r--r--ext/js/pages/settings/keyboard-mouse-input-field.js8
1 files changed, 4 insertions, 4 deletions
diff --git a/ext/js/pages/settings/keyboard-mouse-input-field.js b/ext/js/pages/settings/keyboard-mouse-input-field.js
index 310cbb19..0c45d4bb 100644
--- a/ext/js/pages/settings/keyboard-mouse-input-field.js
+++ b/ext/js/pages/settings/keyboard-mouse-input-field.js
@@ -18,7 +18,7 @@
import {EventDispatcher} from '../../core/event-dispatcher.js';
import {EventListenerCollection} from '../../core/event-listener-collection.js';
-import {DocumentUtil} from '../../dom/document-util.js';
+import {getActiveButtons, getActiveModifiers} from '../../dom/document-util.js';
import {HotkeyUtil} from '../../input/hotkey-util.js';
/**
@@ -139,7 +139,7 @@ export class KeyboardMouseInputField extends EventDispatcher {
* @returns {Set<import('input').ModifierKey>}
*/
_getModifierKeys(e) {
- const modifiers = new Set(DocumentUtil.getActiveModifiers(e));
+ const modifiers = new Set(getActiveModifiers(e));
// https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent/metaKey
// https://askubuntu.com/questions/567731/why-is-shift-alt-being-mapped-to-meta
// It works with mouse events on some platforms, so try to determine if metaKey is pressed.
@@ -216,7 +216,7 @@ export class KeyboardMouseInputField extends EventDispatcher {
*/
_onMouseButtonMouseDown(e) {
e.preventDefault();
- this._addModifiers(DocumentUtil.getActiveButtons(e));
+ this._addModifiers(getActiveButtons(e));
}
/**
@@ -236,7 +236,7 @@ export class KeyboardMouseInputField extends EventDispatcher {
return;
}
e.preventDefault();
- this._addModifiers(DocumentUtil.getActiveButtons(e));
+ this._addModifiers(getActiveButtons(e));
}
/**