| 4842 | } |
| 4843 | |
| 4844 | function handleControlledInputBlur(inst, node) { |
| 4845 | // TODO: In IE, inst is occasionally null. Why? |
| 4846 | if (inst == null) { |
| 4847 | return; |
| 4848 | } |
| 4849 | |
| 4850 | // Fiber and ReactDOM keep wrapper state in separate places |
| 4851 | var state = inst._wrapperState || node._wrapperState; |
| 4852 | |
| 4853 | if (!state || !state.controlled || node.type !== 'number') { |
| 4854 | return; |
| 4855 | } |
| 4856 | |
| 4857 | // If controlled, assign the value attribute to the current value on blur |
| 4858 | setDefaultValue(node, 'number', node.value); |
| 4859 | } |
| 4860 | |
| 4861 | /** |
| 4862 | * This plugin creates an `onChange` event that normalizes change events |