diff options
author | siikamiika <siikamiika@users.noreply.github.com> | 2020-05-03 04:39:24 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-05-03 04:39:24 +0300 |
commit | 77b744e675f8abf17ff5e8433f4f1717e0c9ffb5 (patch) | |
tree | 037cb5c45dc1f9041130ea913d120e7f1526b1e1 /ext/mixed/js/display.js | |
parent | acfdaa4f483790cf3d70a2c1a59d82a422ebed1f (diff) |
Modifier key profile condition (#487)
* update Frontend options on modifier change
* add modifier key profile condition
* use select element for modifier condition value
* support "is" and "is not" modifier key conditions
* use plural
* remove dead null check
it's never null in that function
* pass element on rather than assigning to this
* rename event
* remove Firefox OS key to Meta detection
* hide Meta from dropdown on Firefox
* move input type
Diffstat (limited to 'ext/mixed/js/display.js')
-rw-r--r-- | ext/mixed/js/display.js | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/ext/mixed/js/display.js b/ext/mixed/js/display.js index 32081c70..783af7d8 100644 --- a/ext/mixed/js/display.js +++ b/ext/mixed/js/display.js @@ -338,7 +338,7 @@ class Display { } onKeyDown(e) { - const key = Display.getKeyFromEvent(e); + const key = DOM.getKeyFromEvent(e); const handler = this._onKeyDownHandlers.get(key); if (typeof handler === 'function') { if (handler(e)) { @@ -964,11 +964,6 @@ class Display { return elementRect.top - documentRect.top; } - static getKeyFromEvent(event) { - const key = event.key; - return (typeof key === 'string' ? (key.length === 1 ? key.toUpperCase() : key) : ''); - } - async _getNoteContext() { const documentTitle = await this.getDocumentTitle(); return { |