aboutsummaryrefslogtreecommitdiff
path: root/ext/js/pages/settings/settings-display-controller.js
diff options
context:
space:
mode:
Diffstat (limited to 'ext/js/pages/settings/settings-display-controller.js')
-rw-r--r--ext/js/pages/settings/settings-display-controller.js15
1 files changed, 2 insertions, 13 deletions
diff --git a/ext/js/pages/settings/settings-display-controller.js b/ext/js/pages/settings/settings-display-controller.js
index 9d3e5459..7a40381b 100644
--- a/ext/js/pages/settings/settings-display-controller.js
+++ b/ext/js/pages/settings/settings-display-controller.js
@@ -16,6 +16,7 @@
*/
/* global
+ * DocumentUtil
* PopupMenu
* SelectorObserver
*/
@@ -155,7 +156,7 @@ class SettingsDisplayController {
_onKeyDown(e) {
switch (e.code) {
case 'Escape':
- if (!this._isElementAnInput(document.activeElement)) {
+ if (!DocumentUtil.isInputElementFocused()) {
this._closeTopMenuOrModal();
e.preventDefault();
}
@@ -357,18 +358,6 @@ class SettingsDisplayController {
}
}
- _isElementAnInput(element) {
- const type = element !== null ? element.nodeName.toUpperCase() : null;
- switch (type) {
- case 'INPUT':
- case 'TEXTAREA':
- case 'SELECT':
- return true;
- default:
- return false;
- }
- }
-
_setupDeferLoadIframe(element) {
const parent = this._getMoreContainer(element);
if (parent === null) { return; }