React: Do we need to listen for click on change events?

Created on 5 Jan 2018  路  7Comments  路  Source: facebook/react

Presently, we listen to click events to detect changes on radio buttons and checkboxes. Do we still need to do this?

https://github.com/facebook/react/blob/master/packages/react-dom/src/events/ChangeEventPlugin.js#L198-L211

It looks as though we only do this for IE8. I'm curious about:

  • [ ] Can we remove the click dependency from change events?
  • [ ] If not, we should update the comments to better document why we include click events
DOM Stale

Most helpful comment

Our past selves are way a head of us :P https://github.com/facebook/react/pull/10830

All 7 comments

@jquense do you think this qualifies as a good first issue? For someone interested in picking this up, they would have to:

  1. Remove the click event
  2. Verify correctness in all browsers using the DOM test fixtures
  3. Possibly remove some click event related code in ChangeEventPlugin

Our past selves are way a head of us :P https://github.com/facebook/react/pull/10830

Dang, haha. Fair enough. I'll take another look at that PR.

I'm ashamed to admit how many times I've searched the repo only to find that I've tried to solve the same problem before 馃槅

Yes you need to listen for click on change Events.

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contribution.

Closing this issue after a prolonged period of inactivity. If this issue is still present in the latest release, please create a new issue with up-to-date information. Thank you!

Was this page helpful?
0 / 5 - 0 ratings

Related issues

UnbearableBear picture UnbearableBear  路  3Comments

Prinzhorn picture Prinzhorn  路  3Comments

trusktr picture trusktr  路  3Comments

varghesep picture varghesep  路  3Comments

zpao picture zpao  路  3Comments