()
| 748 | var isBatchingEventUpdates = false; |
| 749 | |
| 750 | function finishEventHandler() { |
| 751 | // Here we wait until all updates have propagated, which is important |
| 752 | // when using controlled components within layers: |
| 753 | // https://github.com/facebook/react/issues/1698 |
| 754 | // Then we restore state of any controlled component. |
| 755 | var controlledComponentsHavePendingUpdates = needsStateRestore(); |
| 756 | |
| 757 | if (controlledComponentsHavePendingUpdates) { |
| 758 | // If a controlled event was fired, we may need to restore the state of |
| 759 | // the DOM node back to the controlled value. This is necessary when React |
| 760 | // bails out of the update without touching the DOM. |
| 761 | flushDiscreteUpdatesImpl(); |
| 762 | restoreStateIfNeeded(); |
| 763 | } |
| 764 | } |
| 765 | |
| 766 | function batchedUpdates(fn, bookkeeping) { |
| 767 | if (isInsideEventHandler) { |
no test coverage detected