(topLevelType, targetInst)
| 4803 | |
| 4804 | // For IE8 and IE9. |
| 4805 | function getTargetInstForInputEventPolyfill(topLevelType, targetInst) { |
| 4806 | if (topLevelType === 'topSelectionChange' || topLevelType === 'topKeyUp' || topLevelType === 'topKeyDown') { |
| 4807 | // On the selectionchange event, the target is just document which isn't |
| 4808 | // helpful for us so just check activeElement instead. |
| 4809 | // |
| 4810 | // 99% of the time, keydown and keyup aren't necessary. IE8 fails to fire |
| 4811 | // propertychange on the first input event after setting `value` from a |
| 4812 | // script and fires only keydown, keypress, keyup. Catching keyup usually |
| 4813 | // gets it and catching keydown lets us fire an event for the first |
| 4814 | // keystroke if user does a key repeat (it'll be a little delayed: right |
| 4815 | // before the second keystroke). Other input methods (e.g., paste) seem to |
| 4816 | // fire selectionchange normally. |
| 4817 | return getInstIfValueChanged(activeElementInst); |
| 4818 | } |
| 4819 | } |
| 4820 | |
| 4821 | /** |
| 4822 | * SECTION: handle `click` event |
nothing calls this directly
no test coverage detected