(nativeEvent)
| 4953 | } |
| 4954 | |
| 4955 | function manualDispatchChangeEvent(nativeEvent) { |
| 4956 | var event = createAndAccumulateChangeEvent(activeElementInst, nativeEvent, getEventTarget(nativeEvent)); |
| 4957 | |
| 4958 | // If change and propertychange bubbled, we'd just bind to it like all the |
| 4959 | // other events and have it go through ReactBrowserEventEmitter. Since it |
| 4960 | // doesn't, we manually listen for the events and so we have to enqueue and |
| 4961 | // process the abstract event manually. |
| 4962 | // |
| 4963 | // Batching is necessary here in order to ensure that all event handlers run |
| 4964 | // before the next rerender (including event handlers attached to ancestor |
| 4965 | // elements instead of directly on the input). Without this, controlled |
| 4966 | // components don't work properly in conjunction with event bubbling because |
| 4967 | // the component is rerendered and the value reverted before all the event |
| 4968 | // handlers can run. See https://github.com/facebook/react/issues/708. |
| 4969 | batchedUpdates(runEventInBatch, event); |
| 4970 | } |
| 4971 | |
| 4972 | function runEventInBatch(event) { |
| 4973 | runEventsInBatch(event, false); |
no test coverage detected