(topLevelType, targetInst)
| 5054 | |
| 5055 | // For IE8 and IE9. |
| 5056 | function getTargetInstForInputEventPolyfill(topLevelType, targetInst) { |
| 5057 | if (topLevelType === 'topSelectionChange' || topLevelType === 'topKeyUp' || topLevelType === 'topKeyDown') { |
| 5058 | // On the selectionchange event, the target is just document which isn't |
| 5059 | // helpful for us so just check activeElement instead. |
| 5060 | // |
| 5061 | // 99% of the time, keydown and keyup aren't necessary. IE8 fails to fire |
| 5062 | // propertychange on the first input event after setting `value` from a |
| 5063 | // script and fires only keydown, keypress, keyup. Catching keyup usually |
| 5064 | // gets it and catching keydown lets us fire an event for the first |
| 5065 | // keystroke if user does a key repeat (it'll be a little delayed: right |
| 5066 | // before the second keystroke). Other input methods (e.g., paste) seem to |
| 5067 | // fire selectionchange normally. |
| 5068 | return getInstIfValueChanged(activeElementInst); |
| 5069 | } |
| 5070 | } |
| 5071 | |
| 5072 | /** |
| 5073 | * SECTION: handle `click` event |
nothing calls this directly
no test coverage detected