summaryrefslogtreecommitdiff
path: root/ext/mixed
diff options
context:
space:
mode:
authorAlex Yatskov <FooSoft@users.noreply.github.com>2019-08-17 14:12:11 -0700
committerGitHub <noreply@github.com>2019-08-17 14:12:11 -0700
commit9ec711b780bf3ee2390a52502b293e89158cb53c (patch)
tree02a8ab47da3337d03fd72de5172c20181df2a630 /ext/mixed
parent8ebac935e8c0ee167514d5726b1e2e16921e4957 (diff)
parentcd1f367798678800a8ed7f6658362b2cbd95a632 (diff)
Merge pull request #176 from toasted-nutbread/selection-touch-scan-disable
Don't scan when touching the current selection
Diffstat (limited to 'ext/mixed')
-rw-r--r--ext/mixed/js/display.js8
1 files changed, 6 insertions, 2 deletions
diff --git a/ext/mixed/js/display.js b/ext/mixed/js/display.js
index 01cb406e..a2707bd0 100644
--- a/ext/mixed/js/display.js
+++ b/ext/mixed/js/display.js
@@ -272,7 +272,9 @@ class Display {
async termsShow(definitions, options, context) {
try {
- window.focus();
+ if (!context || context.focus !== false) {
+ window.focus();
+ }
this.definitions = definitions;
this.options = options;
@@ -324,7 +326,9 @@ class Display {
async kanjiShow(definitions, options, context) {
try {
- window.focus();
+ if (!context || context.focus !== false) {
+ window.focus();
+ }
this.definitions = definitions;
this.options = options;