Find API returns wrong `rangeData` (repeated same result) if searched text is written in input element
Categories
(WebExtensions :: Frontend, defect, P3)
Tracking
(Not tracked)
People
(Reporter: juraj.masiar, Unassigned)
Details
Attachments
(2 files)
| Reporter | ||
Comment 1•7 years ago
|
||
| Reporter | ||
Updated•7 years ago
|
| Reporter | ||
Updated•7 years ago
|
Updated•7 years ago
|
Comment 2•7 years ago
|
||
Updated•7 years ago
|
Comment 3•7 years ago
|
||
Updated•7 years ago
|
Updated•5 years ago
|
I developed an add-on [1] that uses find API and had a problem probably same to this bug.
[1] https://addons.mozilla.org/ja/firefox/addon/auto-find-text-fragment/
This GitHub issue [2] reported that the add-on had incorrect behavior.
[2] https://github.com/xia-sava/auto-find-text-fragment/issues/1#issue-656971013
To reproduce, open the web page [3], and searching string 'City Fur' (including single quote) with find.find({includeRangeData: true}).
[3] https://pool.wikifur.com/w/index.php?title=Convention_map_script&action=edit
The page has big <textarea>, it contains target string, at almost middle of content.
find.highlightResults() works correctly.
rangeData[0].startTextNodePos is incorrect. startTextNodePos is 305 (when I tested),
but traversed DOM with TreeWalker, it's real position is 255.
Do you have any workarounds...?
Updated•3 years ago
|
Updated•1 year ago
|
Description
•