diff options
author | toasted-nutbread <toasted-nutbread@users.noreply.github.com> | 2019-08-09 22:29:14 -0400 |
---|---|---|
committer | toasted-nutbread <toasted-nutbread@users.noreply.github.com> | 2019-08-09 22:29:14 -0400 |
commit | 345b9c6f9dc336265f4ef8cd67cc2beb57abe354 (patch) | |
tree | 92500ba9920fa00d269ec0ac83a416ca7be48119 /ext/mixed/js | |
parent | 710ffb88fc75d57f92a8b33b39f62645fc26fedd (diff) |
Disable focus of popup when using touch
Context menu on Firefox will not target the text properly if the focus is on the popup window.
Diffstat (limited to 'ext/mixed/js')
-rw-r--r-- | ext/mixed/js/display.js | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/ext/mixed/js/display.js b/ext/mixed/js/display.js index 3bb78fe1..5bd57159 100644 --- a/ext/mixed/js/display.js +++ b/ext/mixed/js/display.js @@ -269,7 +269,9 @@ class Display { async termsShow(definitions, options, context) { try { - window.focus(); + if (context && context.focus) { + window.focus(); + } this.definitions = definitions; this.options = options; @@ -321,7 +323,9 @@ class Display { async kanjiShow(definitions, options, context) { try { - window.focus(); + if (context && context.focus) { + window.focus(); + } this.definitions = definitions; this.options = options; |