After https://commits.webkit.org/259904@main the following page shows empty selection when selecting some text inside the textarea, it was selected text before the change. data:text/html,<textarea>Some text</textarea><div>empty</div> <script> document.addEventListener('selectionchange', () => { let div = document.querySelector("div"); div.textContent = window.getSelection().toString(); }); </script>
This is expected behavior change from enabling live range selection.
This is behavior that matches other web browsers and an intentional change. I’m not sure there’s anything more to say about this. We may want to close this bug unless there is additional insight about the effects of this.
> This is behavior that matches other web browsers and an intentional change. In Chromium example above does capture actual selection within the text area. In Firefox it doesn't. With that said, feel free to close this. If this is an intentional change in the behavior, we'll update our test expectations.
I think we should work together to decide what the behavior should be. I had no idea that Chromium and Firefox had different behavior. We should add coverage in Web Platform Tests, write the behavior in some standard, and make sure all the browsers match for interoperability.
To avoid confusion, when talking about updating our tests I meant Playwright test expectations for WebKit (we noticed the change in the behavior with a recent WebKit roll).
Looks like at least one Apple internal website is broken due to this behavior difference. We may need to restore the old behavior of WebKit...
Reopening this bug to restore the old behavior.
<rdar://107622423>
Pull request: https://github.com/WebKit/WebKit/pull/13063
Committed 263280@main (b6892f51e01e): <https://commits.webkit.org/263280@main> Reviewed commits have been landed. Closing PR #13063 and removing active labels.