Skip to content

Commit

Permalink
EPUB: Fix Find Previous jumping to first result of previous section
Browse files Browse the repository at this point in the history
  • Loading branch information
AbeJellinek committed Aug 19, 2024
1 parent 67e7844 commit d571b1c
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/dom/epub/find.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,10 @@ export class EPUBFindProcessor implements FindProcessor {
: 0;
for (let i = startIndex; i < startIndex + this.view.views.length; i++) {
let view = this.view.views[i % this.view.views.length];
let processor = await this._getOrCreateProcessor(view, startRange);
let processor = await this._getOrCreateProcessor(
view,
this._selectedProcessor ? undefined : startRange
);
if (this._selectedProcessor === processor) {
onFirstResult?.();
}
Expand Down

0 comments on commit d571b1c

Please sign in to comment.