| 4203 | } |
| 4204 | |
| 4205 | function handleControlledInputBlur(inst, node) { |
| 4206 | // TODO: In IE, inst is occasionally null. Why? |
| 4207 | if (inst == null) { |
| 4208 | return; |
| 4209 | } |
| 4210 | |
| 4211 | // Fiber and ReactDOM keep wrapper state in separate places |
| 4212 | var state = inst._wrapperState || node._wrapperState; |
| 4213 | |
| 4214 | if (!state || !state.controlled || node.type !== 'number') { |
| 4215 | return; |
| 4216 | } |
| 4217 | |
| 4218 | // If controlled, assign the value attribute to the current value on blur |
| 4219 | setDefaultValue(node, 'number', node.value); |
| 4220 | } |
| 4221 | |
| 4222 | /** |
| 4223 | * This plugin creates an `onChange` event that normalizes change events |