Bug 304174

Summary: Find-in-page should scroll to revealed matches
Product: WebKit Reporter: Jake Archibald <jaffathecake>
Component: WebKit Misc.Assignee: Nobody <webkit-unassigned>
Status: NEW    
Severity: Normal CC: ntim, simon.fraser, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Demo of bug none

Jake Archibald
Reported 2025-12-15 03:58:05 PST
Created attachment 477731 [details] Demo of bug When found text (eg via cmd-f) is revealed, as in it was inside a `<div hidden="until-found">` or `<details>`, the page should be scrolled to the match. Right now WebKit doesn't appear to scroll at all. [Demo](https://random-stuff.jakearchibald.com/bug-repros/until-found-scroll/). I've attached a video of the same bug in Firefox, in case it isn't clear.
Attachments
Demo of bug (281.45 KB, video/mp4)
2025-12-15 03:58 PST, Jake Archibald
no flags
Radar WebKit Bug Importer
Comment 1 2025-12-22 03:59:12 PST
Tim Nguyen (:ntim)
Comment 2 2026-04-08 18:21:44 PDT
There's no step in the spec that says to scroll to the item: https://html.spec.whatwg.org/multipage/interaction.html#ancestor-revealing-algorithm
Tim Nguyen (:ntim)
Comment 3 2026-04-08 18:23:39 PDT
Oh I guess it's implied as part of find-in-page.
Jake Archibald
Comment 4 2026-04-08 20:36:17 PDT
Exactly. It's important that it scrolls to the matched text and not just the revealed element.
Note You need to log in before you can comment on or make changes to this bug.