-
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
Text selection after updating textContent of TEXTAREA #2411
Comments
I guess there's also a question as to what happens to the selection returned by |
Hopefully getSelection() will return nothing, if visually no text is selected? I'm happy to work on the change here and write some web platform tests. I'll be sure to include getSelection() as well as the stuff HTML defines (selectionStart/selectionEnd/selectionDirection). |
I filed w3c/selection-api#83 for the issue of |
That's ... not necessarily true. See discussion in #2424 |
The specification says:
https://html.spec.whatwg.org/multipage/forms.html#the-textarea-element:textcontent
This paragraph doesn't mention text selection. I confirmed Chrome, Edge, Firefox, and Safari set text selection to the end of the new value. So I propose to update the paragraph like the
value
setter.https://html.spec.whatwg.org/multipage/forms.html#dom-textarea-value
The text was updated successfully, but these errors were encountered: