diff options
-rw-r--r-- | ext/fg/js/frontend.js | 2 | ||||
-rw-r--r-- | ext/mixed/js/display.js | 10 |
2 files changed, 11 insertions, 1 deletions
diff --git a/ext/fg/js/frontend.js b/ext/fg/js/frontend.js index bcdfd152..b19e44d2 100644 --- a/ext/fg/js/frontend.js +++ b/ext/fg/js/frontend.js @@ -398,7 +398,7 @@ class Frontend { textSource.getRect(), textSource.getWritingMode(), type, - {definitions, context: {sentence, url, focus}} + {definitions, context: {sentence, url, focus, clearHistoryOnce: true}} ); this.textSourceCurrent = textSource; diff --git a/ext/mixed/js/display.js b/ext/mixed/js/display.js index bd4dc0d0..d83efc13 100644 --- a/ext/mixed/js/display.js +++ b/ext/mixed/js/display.js @@ -351,6 +351,11 @@ class Display { this.setEventListenersActive(false); + if (context.clearHistoryOnce) { + delete context.clearHistoryOnce; + this.poppedContextHistory = []; + } + if (context.focus !== false) { window.focus(); } @@ -406,6 +411,11 @@ class Display { this.setEventListenersActive(false); + if (context.clearHistoryOnce) { + delete context.clearHistoryOnce; + this.poppedContextHistory = []; + } + if (context.focus !== false) { window.focus(); } |