always update current position on term lookup
This commit is contained in:
parent
5929018fac
commit
abe70e3b8c
@ -109,6 +109,10 @@ class Display {
|
|||||||
const scannedElement = e.target;
|
const scannedElement = e.target;
|
||||||
const sentence = docSentenceExtract(textSource, this.options.anki.sentenceExt);
|
const sentence = docSentenceExtract(textSource, this.options.anki.sentenceExt);
|
||||||
|
|
||||||
|
this.context.update({
|
||||||
|
index: this.entryIndexFind(scannedElement),
|
||||||
|
scroll: this.windowScroll.y
|
||||||
|
});
|
||||||
const context = {
|
const context = {
|
||||||
disableScroll,
|
disableScroll,
|
||||||
disableHistory,
|
disableHistory,
|
||||||
@ -121,10 +125,6 @@ class Display {
|
|||||||
next: this.context.next
|
next: this.context.next
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
this.context.update({
|
|
||||||
index: this.entryIndexFind(scannedElement),
|
|
||||||
scroll: this.windowScroll.y
|
|
||||||
});
|
|
||||||
Object.assign(context, {
|
Object.assign(context, {
|
||||||
previous: this.context
|
previous: this.context
|
||||||
});
|
});
|
||||||
|
Loading…
Reference in New Issue
Block a user