summaryrefslogtreecommitdiff
path: root/ext/mixed/js/display.js
diff options
context:
space:
mode:
authortoasted-nutbread <toasted-nutbread@users.noreply.github.com>2019-08-16 17:36:55 -0400
committertoasted-nutbread <toasted-nutbread@users.noreply.github.com>2019-08-16 17:36:55 -0400
commitcd1f367798678800a8ed7f6658362b2cbd95a632 (patch)
treeac99923f9a55b8b13810b07dcd95a2ca31ce042f /ext/mixed/js/display.js
parent345b9c6f9dc336265f4ef8cd67cc2beb57abe354 (diff)
Focus if context is falsy or focus field isn't false
Diffstat (limited to 'ext/mixed/js/display.js')
-rw-r--r--ext/mixed/js/display.js4
1 files changed, 2 insertions, 2 deletions
diff --git a/ext/mixed/js/display.js b/ext/mixed/js/display.js
index 5bd57159..8901ba71 100644
--- a/ext/mixed/js/display.js
+++ b/ext/mixed/js/display.js
@@ -269,7 +269,7 @@ class Display {
async termsShow(definitions, options, context) {
try {
- if (context && context.focus) {
+ if (!context || context.focus !== false) {
window.focus();
}
@@ -323,7 +323,7 @@ class Display {
async kanjiShow(definitions, options, context) {
try {
- if (context && context.focus) {
+ if (!context || context.focus !== false) {
window.focus();
}