(topLevelType, targetInst)
| 1115 | |
| 1116 | // For IE8 and IE9. |
| 1117 | function getTargetInstForInputEventIE(topLevelType, targetInst) { |
| 1118 | if (topLevelType === topLevelTypes.topSelectionChange || topLevelType === topLevelTypes.topKeyUp || topLevelType === topLevelTypes.topKeyDown) { |
| 1119 | // On the selectionchange event, the target is just document which isn't |
| 1120 | // helpful for us so just check activeElement instead. |
| 1121 | // |
| 1122 | // 99% of the time, keydown and keyup aren't necessary. IE8 fails to fire |
| 1123 | // propertychange on the first input event after setting `value` from a |
| 1124 | // script and fires only keydown, keypress, keyup. Catching keyup usually |
| 1125 | // gets it and catching keydown lets us fire an event for the first |
| 1126 | // keystroke if user does a key repeat (it'll be a little delayed: right |
| 1127 | // before the second keystroke). Other input methods (e.g., paste) seem to |
| 1128 | // fire selectionchange normally. |
| 1129 | if (activeElement && activeElement.value !== activeElementValue) { |
| 1130 | activeElementValue = activeElement.value; |
| 1131 | return activeElementInst; |
| 1132 | } |
| 1133 | } |
| 1134 | } |
| 1135 | |
| 1136 | /** |
| 1137 | * SECTION: handle `click` event |
nothing calls this directly
no outgoing calls
no test coverage detected
searching dependent graphs…