incubator-annotator
incubator-annotator copied to clipboard
Don’t find/highlight text inside <textarea> elements (or other invalid parents for a <mark>).
Highlighting (using <mark> elements, as we do) text inside a <textarea> will make that text disappear. The higlighter should either fail or modify the given range if parts of it are within a textarea.
This could be generalised to any element where a <mark> element would not be permitted as a child.
Another case could be mathml sections or SVGs.
Yet another issue in this theme: table layout can be messed up by the added <mark> elements.