diff options
| author | siikamiika <siikamiika@users.noreply.github.com> | 2019-12-01 06:08:05 +0200 | 
|---|---|---|
| committer | siikamiika <siikamiika@users.noreply.github.com> | 2019-12-01 06:08:05 +0200 | 
| commit | abe70e3b8c9fe8fb59cfbdad7b0e6f242971a4c5 (patch) | |
| tree | 474b8a90ddd9d69ef572f097a959b82784c906e7 /ext/mixed/js | |
| parent | 5929018facf792c203e18d3ec690478ee44388e0 (diff) | |
always update current position on term lookup
Diffstat (limited to 'ext/mixed/js')
| -rw-r--r-- | ext/mixed/js/display.js | 8 | 
1 files changed, 4 insertions, 4 deletions
| diff --git a/ext/mixed/js/display.js b/ext/mixed/js/display.js index ab50aac0..303023be 100644 --- a/ext/mixed/js/display.js +++ b/ext/mixed/js/display.js @@ -109,6 +109,10 @@ class Display {              const scannedElement = e.target;              const sentence = docSentenceExtract(textSource, this.options.anki.sentenceExt); +            this.context.update({ +                index: this.entryIndexFind(scannedElement), +                scroll: this.windowScroll.y +            });              const context = {                  disableScroll,                  disableHistory, @@ -121,10 +125,6 @@ class Display {                      next: this.context.next                  });              } else { -                this.context.update({ -                    index: this.entryIndexFind(scannedElement), -                    scroll: this.windowScroll.y -                });                  Object.assign(context, {                      previous: this.context                  }); |