MCPcopy Create free account
hub / github.com/Lobos/react-ui / handleEventsForInputEventIE

Function handleEventsForInputEventIE

docs/lib/react.js:1094–1114  ·  view source on GitHub ↗
(topLevelType, target, targetInst)

Source from the content-addressed store, hash-verified

1092}
1093
1094function handleEventsForInputEventIE(topLevelType, target, targetInst) {
1095 if (topLevelType === topLevelTypes.topFocus) {
1096 // In IE8, we can capture almost all .value changes by adding a
1097 // propertychange handler and looking for events with propertyName
1098 // equal to 'value'
1099 // In IE9-11, propertychange fires for most input events but is buggy and
1100 // doesn't fire when text is deleted, but conveniently, selectionchange
1101 // appears to fire in all of the remaining cases so we catch those and
1102 // forward the event if the value has changed
1103 // In either case, we don't want to call the event handler if the value
1104 // is changed from JS so we redefine a setter for `.value` that updates
1105 // our activeElementValue variable, allowing us to ignore those changes
1106 //
1107 // stopWatching() should be a noop here but we call it just in case we
1108 // missed a blur event somehow.
1109 stopWatchingForValueChange();
1110 startWatchingForValueChange(target, targetInst);
1111 } else if (topLevelType === topLevelTypes.topBlur) {
1112 stopWatchingForValueChange();
1113 }
1114}
1115
1116// For IE8 and IE9.
1117function getTargetInstForInputEventIE(topLevelType, targetInst) {

Callers

nothing calls this directly

Calls 2

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…