-
Notifications
You must be signed in to change notification settings - Fork 2k
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
HTMLInputElement/HTMLTextAreaElement selectionchanged_event feature #12126
Conversation
@ddbeck Howdy, can you please help me find someone to sanity check this one? |
(Self-requested a review on this. Sorry for the wait, @hamishwillee.) |
Answers to your questions, @hamishwillee. Thanks again for your patience on this.
I tested this too and it looks right. I'd go ahead with
I'm not 100% sure about this one. I don't think so, on the basis that the new features here cover that. But mixins are hard. @Elchi3 do you have a take on this?
No (not sure why it ever was, to be honest), but I'd say that ought to change in a separate PR. |
Thanks @ddbeck. I've updated the chromiums. This should be good to merge.
|
We have #12290 on file to get rid of the last two mixins in BCD, so this one will get reorganized at some point. I'm fine with not updating it for the moment. Updating it can't hurt either, I guess. It depends on what is most useful to show on https://developer.mozilla.org/en-US/docs/Web/API/GlobalEventHandlers/onselectionchange right now (that page should also be something else if we are decided what to do about this mixin). |
Thank @Elchi3. I won't document this in @ddbeck Upshot, this can be merged. Thanks! |
Co-authored-by: Daniel D. Beck <[email protected]>
Co-authored-by: Daniel D. Beck <[email protected]>
Thanks @ddbeck . Before I started this job I thought I was careful and meticulous :-( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Before I started this job I thought I was careful and meticulous
It turns out there's always more detail. 😅
FF92 adds support for this spec change to
selectionchange
events in https://bugzilla.mozilla.org/show_bug.cgi?id=1648944In summary,
selectionchange_event
(no cancel, no bubble) was fired onDocument
to indicate that the selection (essentially a "breaking point" node and optionally a range of nodes from that) had changed.HTMLInputElement
andHTMLInputElement
. (i.e.<textarea>
or<input>
). This is not cancellable (as well) but can bubble. All these events are handled in GlobalEventHandlers.onselectionchangeWhat this does is add the event to
HTMLInputElement
andHTMLInputElement
.null
for the other browsers. The spec change does not provide any indication either way and this thing seems to be out of date: https://docs.w3cub.com/dom_events/selectionchangeQuestions:
false
for webkit and chromiumDocs tracking: mdn/content#7755