window.find() scrolls to the match asynchronously, overriding a scroll() called right after it
Categories
(Core :: Find Backend, defect)
Tracking
()
| Tracking | Status | |
|---|---|---|
| firefox161 | --- | fixed |
People
(Reporter: florian, Assigned: florian)
References
(Blocks 1 open bug)
Details
Attachments
(1 external file)
Since bug 2006040, nsWebBrowserFind scrolls to a window.find() match from a dispatched runnable, so the ancestor revealing algorithm can run first. A page calling scroll(0,0) right after window.find() is then scrolled back to the match one task later. This regresses bug 1659276, which was filed from a live site doing exactly that, and makes editor/libeditor/tests/test_bug1659276.html fail whenever it runs first in a fresh browser (the mochitest-plain-standalone jobs, where it is skipped).
The deferred scroll is only needed when the match is inside hidden=until-found content or a closed <details>; otherwise window.find() can scroll synchronously as it did before.
| Assignee | ||
Comment 1•1 month ago
|
||
Bug 2006040 made window.find() always scroll to the match from a separate
task, so a script calling scroll() right after window.find() no longer wins,
regressing bug 1659276. Only defer the scroll when hidden ancestors have to be
revealed first.
test_bug1659276.html failed whenever it ran first in a fresh browser, so it
was skipped in the standalone jobs (bug 2026600); it is now re-enabled.
Updated•29 days ago
|
Comment 3•28 days ago
|
||
| bugherder | ||
Updated•18 days ago
|
Description
•