Skip to content
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

Adapt selectstart/selectionchange events to new event structure #16359

Merged
merged 5 commits into from
Jul 12, 2022

Conversation

foolip
Copy link
Contributor

@foolip foolip commented May 19, 2022

Per https://w3c.github.io/selection-api/#selectstart-event the event target of "selectstart" events is a Node, which will be either an Element or a Text node.

Per https://w3c.github.io/selection-api/#selectionchange-event the event target can be Document, HTMLInputElement or HTMLTextareaElement.

Part of #7545.

@github-actions github-actions bot added the data:api Compat data for Web APIs. https://developer.mozilla.org/docs/Web/API label May 19, 2022
@foolip foolip force-pushed the selectstart-selectionchange branch 2 times, most recently from 83052ff to 36770ab Compare May 19, 2022 08:44
@foolip
Copy link
Contributor Author

foolip commented May 19, 2022

http://mdn-bcd-collector.appspot.com/tests/api/HTMLElement/selectstart_event was used to confirm support in the following releases:

  • Chrome 15
  • IE 6
  • Firefox 52 (not 51)
  • Safari 4

The earliest versions of Chrome, IE and Safari can't be confirmed with BrowserStack, so the existing data is assumed to be correct. IE had to be bumped to 5 since Node itself wasn't supported before then. The event itself might have been, but it's not worth trying to capture this.

@foolip
Copy link
Contributor Author

foolip commented May 19, 2022

http://mdn-bcd-collector.appspot.com/tests/api/Document/selectionchange_event was used to confirm support in the following releases:

  • Chrome 15
  • IE 6
  • Firefox 52 (not 51)
  • Safari 5.1 (not 4)

The collector doesn't have these tests, but they would be needed to keep this data up-to-date in the future:
http://mdn-bcd-collector.appspot.com/tests/api/HTMLTextAreaElement/selectionchange_event
http://mdn-bcd-collector.appspot.com/tests/api/HTMLInputElement/selectionchange_event

@queengooborg queengooborg added the needs content update This PR needs a corresponding update to mdn/content to update the documentation label May 21, 2022
Copy link
Contributor

@queengooborg queengooborg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is LGTM, just waiting on the content updates!

@foolip foolip force-pushed the selectstart-selectionchange branch 2 times, most recently from 7ddb459 to a50eef5 Compare May 23, 2022 07:06
@github-actions
Copy link

github-actions bot commented Jun 5, 2022

This pull request has merge conflicts that must be resolved before it can be merged.

@github-actions
Copy link

This pull request has merge conflicts that must be resolved before it can be merged.

@github-actions
Copy link

This pull request has merge conflicts that must be resolved before it can be merged.

1 similar comment
@github-actions
Copy link

This pull request has merge conflicts that must be resolved before it can be merged.

@foolip foolip force-pushed the selectstart-selectionchange branch from 5f49acb to a768b02 Compare July 7, 2022 08:57
@foolip foolip force-pushed the selectstart-selectionchange branch from a768b02 to 8df7d41 Compare July 7, 2022 09:07
@foolip
Copy link
Contributor Author

foolip commented Jul 7, 2022

@queengooborg might you be able to take care of the content updates for this? I haven't done any event untangling in content, so it'd take me a while to figure out what to keep/remove/rewrite.

@github-actions
Copy link

github-actions bot commented Jul 9, 2022

This pull request has merge conflicts that must be resolved before it can be merged.

@github-actions
Copy link

This pull request has merge conflicts that must be resolved before it can be merged.

@github-actions
Copy link

This pull request has merge conflicts that must be resolved before it can be merged.

@queengooborg queengooborg removed the needs content update This PR needs a corresponding update to mdn/content to update the documentation label Jul 12, 2022
@queengooborg queengooborg merged commit 569d47e into mdn:main Jul 12, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
data:api Compat data for Web APIs. https://developer.mozilla.org/docs/Web/API
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants