A bug worth telling
Highlights on the wrong word
- What happened
- Restored highlights landed on the wrong occurrence of a word, one or two along.
- Why
- Restoring matched by the text itself, and “important” appears six times in most articles. It reliably found the wrong one.
- The fix
- Save the selection’s character offset within the page’s text, and restore it from the text node that owns that exact range. Text is ambiguous; position isn’t.




