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

disabled button onClick handler triggered erroneously #8826

Closed
krisyoung opened this issue Jan 19, 2017 · 2 comments
Closed

disabled button onClick handler triggered erroneously #8826

krisyoung opened this issue Jan 19, 2017 · 2 comments

Comments

@krisyoung
Copy link

Do you want to request a feature or report a bug?
Bug

What is the current behavior?
For buttons with children other than text nodes, when the disabled attribute is true, click handlers are still triggered

If the current behavior is a bug, please provide the steps to reproduce and if possible a minimal demo of the problem via https://jsfiddle.net or similar (template: https://jsfiddle.net/reactjs/69z2wepo/).
load code pen and check react v 15.4.0, observe button click behaviour for both instances
http://codepen.io/anon/pen/xggoOw

What is the expected behavior?
button click should not trigger on click handler

Which versions of React, and which browser / OS are affected by this issue? Did this work in previous versions of React?
bug appears in v15.4.0
behaviour is correct in v15.3.1

@aweary
Copy link
Contributor

aweary commented Jan 19, 2017

Thanks for the report @krisyoung. This issue was resolved with the 15.4.1 release. The PR that fixed this was #8387. Here's a Codepen running the latest release (15.4.2) showing that the issue no longer occurs. You should be able to safely update from 15.4.0 to 15.4.2 since there were only patch releases!

Hope that helps.

@krisyoung
Copy link
Author

Thanks, my bad for not checking there was a 15.4.x

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

No branches or pull requests

2 participants