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

Remove no-onchange from recommended and strict #757

Merged
merged 1 commit into from
Nov 28, 2020
Merged

Remove no-onchange from recommended and strict #757

merged 1 commit into from
Nov 28, 2020

Conversation

karlhorky
Copy link
Contributor

@karlhorky karlhorky commented Nov 17, 2020

TODO

See #398 (comment)

Closes #398

Copy link
Member

@ljharb ljharb left a comment

Choose a reason for hiding this comment

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

Before landing this, I'd like to understand which browsers it's relevant for, so we can note it in the documentation.

@karlhorky
Copy link
Contributor Author

QuirksMode to the rescue!

Screen Shot 2020-11-17 at 20 58 44

When you focus on a select box and go through its options with the keyboard, IE and Opera fire the change event every time you select a new option. The other browsers fire the event only when you confirm the new option by leaving the select box.

So it looks like the bug was there until at least IE10 pr2.

@ljharb does that address the question of compatibility?

https://www.quirksmode.org/dom/events/change.html#t05

@karlhorky
Copy link
Contributor Author

Also interesting to note is that it was actually written into the DOM spec a long time ago this way: https://bugzilla.mozilla.org/show_bug.cgi?id=969068#c2

@ljharb
Copy link
Member

ljharb commented Nov 18, 2020

Gotcha, thanks. At the very least, let's add that to the docs - IE 10 is still something many sites have to support, but it's reasonable to take it out of the configs.

@karlhorky
Copy link
Contributor Author

karlhorky commented Nov 18, 2020

Ok, I've added a deprecation warning following the other PRs such as #713, along with an explanation. Is it acceptable like this?

I've also marked this PR to close #398 if it gets merged.

@karlhorky
Copy link
Contributor Author

@ljharb What do you think about my new changes? Is this good to get merged?

@ljharb ljharb merged commit 20b48a4 into jsx-eslint:master Nov 28, 2020
@karlhorky
Copy link
Contributor Author

Thanks for the review and merge @ljharb !

@karlhorky karlhorky deleted the patch-1 branch November 28, 2020 11:21
zstix added a commit to newrelic/developer-website that referenced this pull request Jun 2, 2021
The community seems to prefer to not use this rule anymore:
jsx-eslint/eslint-plugin-jsx-a11y#757
@ljharb ljharb mentioned this pull request Nov 15, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Is no-onchange still a relevant rule?
2 participants