From 7b6a4c4e36ce65af376cd87f5f9e7c657ef2a12c Mon Sep 17 00:00:00 2001 From: toasted-nutbread Date: Sat, 21 Nov 2020 21:17:39 -0500 Subject: More display updates (#1050) * Use grid for layout * Add data-count attribute * Fix scroll issues during focus * Add index to entries * Simplify audio playback --- ext/bg/js/search.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'ext/bg') diff --git a/ext/bg/js/search.js b/ext/bg/js/search.js index bd840981..1dda0f43 100644 --- a/ext/bg/js/search.js +++ b/ext/bg/js/search.js @@ -44,7 +44,7 @@ class DisplaySearch extends Display { }); this._onKeyDownIgnoreKeys = new Map([ ['ANY_MOD', new Set([ - 'Tab', 'ArrowUp', 'ArrowDown', 'ArrowLeft', 'ArrowRight', 'PageDown', 'PageUp', 'Home', 'End', 'Enter', + 'Tab', 'ArrowUp', 'ArrowDown', 'ArrowLeft', 'ArrowRight', 'PageDown', 'PageUp', 'Home', 'End', 'Enter', 'Escape', 'F1', 'F2', 'F3', 'F4', 'F5', 'F6', 'F7', 'F8', 'F9', 'F10', 'F11', 'F12', 'F13', 'F14', 'F15', 'F16', 'F17', 'F18', 'F19', 'F20', 'F21', 'F22', 'F23', 'F24' @@ -157,7 +157,7 @@ class DisplaySearch extends Display { case 'kanji': animate = content.animate; valid = content.definitions.length > 0; - this._queryInput.blur(); + this.blurElement(this._queryInput); break; case 'clear': valid = false; @@ -183,7 +183,7 @@ class DisplaySearch extends Display { // Search e.preventDefault(); e.stopImmediatePropagation(); - e.currentTarget.blur(); + this.blurElement(e.currentTarget); this._search(); } -- cgit v1.2.3