Find-in-page should scroll to revealed matches
Categories
(Core :: Find Backend, defect)
Tracking
()
| Tracking | Status | |
|---|---|---|
| firefox148 | --- | fixed |
People
(Reporter: jakea, Assigned: jjaschke)
Details
(Keywords: dev-doc-complete)
Attachments
(3 files)
Observed on MacOS, but I assume other platforms are impacted.
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 Firefox appears to scroll only to the container.
Demo.
Updated•5 months ago
|
Updated•5 months ago
|
Comment 1•5 months ago
|
||
(Probably we're not flushing layout between revealing and scrolling-to-match)
| Assignee | ||
Comment 2•5 months ago
|
||
So, the spec says to queue a task and run the ancestor revealing algorithm.
We do that, and after that, we scroll the selection into view, which means that we scroll before we reveal.
Comment 3•5 months ago
|
||
A potential one-liner fix could be to use Async scroll mode here, but that said, the MoveFocus looks also suspicious since we'd be moving focus to something that hasn't been revealed...
| Assignee | ||
Comment 4•5 months ago
|
||
Before this patch, the ancestor reveal algorithm would run asynchronously,
and therefore after the synchronous scroll attempt.
This breaks find-in-page for hidden=until-found / details elements.
This patch moves the scroll logic to run after the reveal has completed.
Updated•5 months ago
|
| Assignee | ||
Comment 5•5 months ago
|
||
Same as part 1, but for window.find().
Updated•5 months ago
|
Comment 7•5 months ago
|
||
| bugherder | ||
https://hg.mozilla.org/mozilla-central/rev/2e7e018acd6b
https://hg.mozilla.org/mozilla-central/rev/ec705b3ec0db
| Reporter | ||
Updated•5 months ago
|
| Reporter | ||
Comment 8•5 months ago
|
||
dev-doc-needed because I marked this as a partial implementation in https://github.com/mdn/browser-compat-data/pull/28672, so that needs updating once we know what version it's landing in.
Comment 9•3 months ago
|
||
FF148 MDN work can be tracked in https://github.com/mdn/content/issues/42751 (just the BCD updated)
Description
•