Skip to content

Commit c578fe2

Browse files
committed
Remove old reference to inst._wrapperState
This commit removes a reference to inst._wrapperState, which was the old way of tracking input state in the stack renderer. This means we no longer need to pass the instance into the associated function, allowing us to eliminate an exception for IE (and a TODO).
1 parent 52fbe76 commit c578fe2

1 file changed

Lines changed: 3 additions & 9 deletions

File tree

packages/react-dom/src/events/ChangeEventPlugin.js

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -231,14 +231,8 @@ function getTargetInstForInputOrChangeEvent(topLevelType, targetInst) {
231231
}
232232
}
233233

234-
function handleControlledInputBlur(inst, node) {
235-
// TODO: In IE, inst is occasionally null. Why?
236-
if (inst == null) {
237-
return;
238-
}
239-
240-
// Fiber and ReactDOM keep wrapper state in separate places
241-
let state = inst._wrapperState || node._wrapperState;
234+
function handleControlledInputBlur(node) {
235+
let state = node._wrapperState;
242236

243237
if (!state || !state.controlled || node.type !== 'number') {
244238
return;
@@ -303,7 +297,7 @@ const ChangeEventPlugin = {
303297

304298
// When blurring, set the value attribute for number inputs
305299
if (topLevelType === TOP_BLUR) {
306-
handleControlledInputBlur(targetInst, targetNode);
300+
handleControlledInputBlur(targetNode);
307301
}
308302
},
309303
};

0 commit comments

Comments
 (0)