pdf.js Find Next scrolls backward in continuous view: 'figure' match on page 7 → viewer jumps to page 6
Comments · 0
Be the first to comment.
Bug reportby SceneRecap AI
Repro steps
- 1.Open /pdf.js/web/viewer.html with compressed.tracemonkey-pldi-09.pdf. It shows page 1 of 14.
- 2.Change the zoom selector from Automatic Zoom to 125%.
- 3.Press Control+f to open the find bar.
- 4.Type 'figure'. The counter shows 1 of 27 matches on page 2.
- 5.Press Enter repeatedly (9 times) until the counter reads 10 of 27 matches. The highlight is on 'Figure 7 shows basic trace tree compilation' and the page indicator reads 7.
- 6.Press Enter once more (Find Next).
- 7.Observe the counter reads 11 of 27 matches. The viewer scrolls up to the 'Figure 5.' caption and the page indicator drops to 6.
Expected
Find Next moves to the next match further down the document. The viewport scrolls forward or stays in place, like the earlier presses that went from page 2 to page 3 to page 7.
Actual
From match 10 of 27 (page indicator 7, highlight on 'Figure 7 shows...' in Section 4), Find Next goes to match 11 of 27, the 'Figure 5.' caption at the top of the right column on page 6. The viewer scrolls backward and the page indicator changes from 7 to 6. Match 12 ('Figure 6.' caption) is also above the Section 4 text that held match 10. Only match 13 moves forward to the 'Figure 7.' caption on page 7.
Evidence
Issue markdown (copy-paste ready)
## Summary In the pdf.js viewer, Find Next for `figure` scrolls backward in continuous view. From match 10 of 27 (page indicator 7), the next match (11 of 27) is the `Figure 5.` caption on page 6. The viewer jumps up and the page indicator changes from 7 to 6. ## Environment - Chromium 151.0.7922.34, macOS - Viewport 1280x720, DPR 1, en-US, Europe/Berlin - `/pdf.js/web/viewer.html`, document `compressed.tracemonkey-pldi-09.pdf` (14 pages) ## Steps to reproduce 1. Open the viewer with `compressed.tracemonkey-pldi-09.pdf` (0s). 2. Set zoom to 125% (3s). 3. Press `Control+f` (6s) and type `figure`. The counter shows `1 of 27 matches` (9s). 4. Press Enter until the counter reads `10 of 27 matches` (15s). The highlight is on `Figure 7 shows basic trace tree compilation` and the page indicator reads 7. 5. Press Enter once more (17.5s). ## Expected Find Next moves forward to the next match down the document. The viewport does not scroll back above the current match. ## Actual - 19s: `11 of 27 matches`, page indicator 6, highlight on the `Figure 5.` caption at the top of the page. The view scrolled backward. - 21s: `12 of 27 matches`, still page 6 (`Figure 6.` caption), above the text of match 10. - 29s: `13 of 27 matches`, page 7 (`Figure 7.` caption). Forward order resumes. ## Control (works) - 9s: match 1 on page 2. 11s: match 2 on page 2. 13s: match 5 on page 3. Each press moved forward. ## Evidence - Visual: page indicator 7 at 15s, then 6 at 19s after one Find Next. - Visual: overlay at 25s reads `delta: ? expected: positive`. - Console (24.9s): three CSP `style-src 'self'` inline style errors. These appear with the overlay and are likely unrelated. - Console (0s): `No available adapters.` warning. - Side note: the zoom read 125% at 7s but Automatic Zoom at 9s after the search. ## Suspected area Find controller match ordering within a two-column page. Matches seem to follow text-content order rather than visual position, so Find Next can scroll backward. *Recorded with SceneRecap.*
This report was written by SceneRecap from a screen recording. Try SceneRecap free
Turn a screen recording into a bug report like this one.
Repro steps, expected vs actual and the console and network evidence, each with a timestamp. On every plan, Free included.
Try SceneRecap free →