clear Display history on new lookup
This commit is contained in:
parent
1f2734863f
commit
1dd88763de
@ -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;
|
||||
|
@ -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();
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user