(nativeEvent)
| 4840 | } |
| 4841 | |
| 4842 | function manualDispatchChangeEvent(nativeEvent) { |
| 4843 | var event = createAndAccumulateChangeEvent(activeElementInst, nativeEvent, getEventTarget(nativeEvent)); |
| 4844 | |
| 4845 | // If change and propertychange bubbled, we'd just bind to it like all the |
| 4846 | // other events and have it go through ReactBrowserEventEmitter. Since it |
| 4847 | // doesn't, we manually listen for the events and so we have to enqueue and |
| 4848 | // process the abstract event manually. |
| 4849 | // |
| 4850 | // Batching is necessary here in order to ensure that all event handlers run |
| 4851 | // before the next rerender (including event handlers attached to ancestor |
| 4852 | // elements instead of directly on the input). Without this, controlled |
| 4853 | // components don't work properly in conjunction with event bubbling because |
| 4854 | // the component is rerendered and the value reverted before all the event |
| 4855 | // handlers can run. See https://github.com/facebook/react/issues/708. |
| 4856 | batchedUpdates(runEventInBatch, event); |
| 4857 | } |
| 4858 | |
| 4859 | function runEventInBatch(event) { |
| 4860 | runEventsInBatch(event, false); |
no test coverage detected