-
Notifications
You must be signed in to change notification settings - Fork 2.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
interop: Trailing whitespace in h1/h2/.. is removed in chrome, but not firefox #8003
Comments
This is not an interop issue, but instead a user interface choice that Chrome and Firefox have made differently about whether to make text nodes containing trailing whitespace selectable. (Or maybe it is about the The tokenization/parser spec, and indeed the HTML spec itself, say nothing about what should happen when the user selects text. |
Can you not use |
I can confirm that |
This document:
is tokenized like so (using html5gum for reference):
...yet chrome does not actually allow you to select a trailing whitespace in such a document.
firefox does. but in its devtools it does not show the trailing whitespace.
which behavior is more correct? The tokenization spec seems to be pretty clear about preserving this extra whitespace (so firefox would be correct), but I don't have the full overview over the spec to know whether the treebuilder might do something with extra whitespace. Also this seems like a pretty basic disagreement across browsers, so I thought it'd be worth discussing in WHATWG.
The text was updated successfully, but these errors were encountered: