Closed
Description
In this repro, I created 2 buttons and only one is rendered at a time. One button's click handler is hooked up to React's synthetic "click" event while the other is hooked up to the native "click" event. Even though only one button is rendered at a time, a single click is triggering both click events.
This bug can be hit by apps that mix React components with non-React controls (e.g. jQuery UI).
Repro Steps
I reproed this in Chrome with React 0.13.2.
- Go to http://jsfiddle.net/xzucgepn/
- Click the button labeled "One"
Expected: There's a button rendered labeled "Two"
Actual: The rendered button still has the label "One"
If you open the console, you'll see "goToTwo" and "goToOne" which indicates that the "One" button's click handler ran and then the "Two" button's click handler ran (even though we never saw button "Two"").