dillon1000/react

Commit

Upgrade TextChangeEventPlugin to ChangeEventPlugin and support more form elements

Upgrade `TextChangeEventPlugin` to be the `onChange` event that React
fires. In React, `onChange` will now fire when `input` fires for form elements in
modern browsers.

Handle this for:

  input[type=text]
  input[type=password]
  input[type=checkbox]
  input[type=radio]
  textarea
  select

Support:

- OSX Chrome
- OSX Safari
- OSX Firefox
- Win 7 / IE8
- Win 7 / IE9
- Win 7 / IE10

Everything works but caret selection / placement differs from browser to
browser.

For <select> elements, the event is fired with `change`. This is a
conscious decision, even though in some browsers (OSX firefox, IE), it
can be argued that the event should fire more due to how the UI looks.

Builds on https://github.com/facebook/react/pull/75, which handled only
text inputs.
Browse files
Changed paths5 files
First-parent comparison
M src/core/ReactDefaultInjection.js ModifiedM src/dom/components/ReactDOMInput.js ModifiedR src/eventPlugins/TextChangeEventPlugin.js →src/eventPlugins/ChangeEventPlugin.js RenamedM src/eventPlugins/DefaultEventPluginOrder.js ModifiedM src/eventPlugins/SimpleEventPlugin.js Modified
Patch

Files changed

Rendering syntax-highlighted changes…