| 4980 | } |
| 4981 | |
| 4982 | function handleControlledInputBlur(inst, node) { |
| 4983 | // TODO: In IE, inst is occasionally null. Why? |
| 4984 | if (inst == null) { |
| 4985 | return; |
| 4986 | } |
| 4987 | |
| 4988 | // Fiber and ReactDOM keep wrapper state in separate places |
| 4989 | var state = inst._wrapperState || node._wrapperState; |
| 4990 | |
| 4991 | if (!state || !state.controlled || node.type !== 'number') { |
| 4992 | return; |
| 4993 | } |
| 4994 | |
| 4995 | // If controlled, assign the value attribute to the current value on blur |
| 4996 | setDefaultValue(node, 'number', node.value); |
| 4997 | } |
| 4998 | |
| 4999 | /** |
| 5000 | * This plugin creates an `onChange` event that normalizes change events |