aboutsummaryrefslogtreecommitdiff
path: root/ext
diff options
context:
space:
mode:
Diffstat (limited to 'ext')
-rw-r--r--ext/bg/js/search.js10
-rw-r--r--ext/fg/js/float.js15
-rw-r--r--ext/mixed/css/display.css1
3 files changed, 9 insertions, 17 deletions
diff --git a/ext/bg/js/search.js b/ext/bg/js/search.js
index e9b1918b..0a7a5fe1 100644
--- a/ext/bg/js/search.js
+++ b/ext/bg/js/search.js
@@ -49,10 +49,10 @@ class DisplaySearch extends Display {
])],
['Control', new Set(['C', 'A', 'Z', 'Y', 'X', 'F', 'G'])],
['Meta', new Set(['C', 'A', 'Z', 'Y', 'X', 'F', 'G'])],
- ['OS', []],
- ['Alt', []],
- ['AltGraph', []],
- ['Shift', []]
+ ['OS', new Set()],
+ ['Alt', new Set()],
+ ['AltGraph', new Set()],
+ ['Shift', new Set()]
]);
this._runtimeMessageHandlers = new Map([
@@ -175,6 +175,8 @@ class DisplaySearch extends Display {
const activeModifierMap = new Map([
['Control', e.ctrlKey],
['Meta', e.metaKey],
+ ['Shift', e.shiftKey],
+ ['Alt', e.altKey],
['ANY_MOD', true]
]);
diff --git a/ext/fg/js/float.js b/ext/fg/js/float.js
index aef0367e..bc459d23 100644
--- a/ext/fg/js/float.js
+++ b/ext/fg/js/float.js
@@ -40,7 +40,8 @@ class DisplayFloat extends Display {
return true;
}
return false;
- }]
+ }],
+ ...this._onKeyDownHandlers
]);
this._windowMessageHandlers = new Map([
@@ -114,18 +115,6 @@ class DisplayFloat extends Display {
}
}
- onKeyDown(e) {
- const key = Display.getKeyFromEvent(e);
- const handler = this._onKeyDownHandlers.get(key);
- if (typeof handler === 'function') {
- if (handler(e)) {
- e.preventDefault();
- return true;
- }
- }
- return super.onKeyDown(e);
- }
-
async getMessageToken() {
// this._messageTokenPromise is used to ensure that only one call to apiGetMessageToken is made.
if (this._messageTokenPromise === null) {
diff --git a/ext/mixed/css/display.css b/ext/mixed/css/display.css
index 5a0775f0..c4758235 100644
--- a/ext/mixed/css/display.css
+++ b/ext/mixed/css/display.css
@@ -78,6 +78,7 @@ ol, ul {
padding: 0.25em 0.5em;
border-bottom-width: 0.07142857em; /* 14px => 1px */
border-bottom-style: solid;
+ z-index: 10;
}
:root[data-yomichan-page=search] .navigation-header {