Open
Bug 1950707
Opened 14 days ago
Updated 14 days ago
nsFind should skip visibility: hidden nodes instead of breaking
Categories
(Core :: Find Backend, defect)
Core
Find Backend
Tracking
()
NEW
People
(Reporter: jjaschke, Unassigned)
Details
Example:
Open this page:
data:text/html,<p>text with <span style="visibility:hidden">invisible </span>content
Try to search for "text with content"
Expected: The text should be found
Actual: The text is not found. Only "text with " can be found.
This also affects finding text fragments, which uses nsFind
. This can be reproduced by adding #:~:text=text with content
to the page above.
Pointers:
We would want to skip a node which is visibility: hidden
, which is done here. But adding !IsFindableNode()
to that if
condition won't be enough, because that would skip the subtree. But a case like this must work:
<p style="visibility: hidden"><span style="visibility: visible">visible content</span></p>
Therefore, SkipNode
must be updated to not skip the subtree for this case.
You need to log in
before you can comment on or make changes to this bug.
Description
•