| 4877 | } |
| 4878 | |
| 4879 | function handleControlledInputBlur(inst, node) { |
| 4880 | // TODO: In IE, inst is occasionally null. Why? |
| 4881 | if (inst == null) { |
| 4882 | return; |
| 4883 | } |
| 4884 | |
| 4885 | // Fiber and ReactDOM keep wrapper state in separate places |
| 4886 | var state = inst._wrapperState || node._wrapperState; |
| 4887 | |
| 4888 | if (!state || !state.controlled || node.type !== 'number') { |
| 4889 | return; |
| 4890 | } |
| 4891 | |
| 4892 | // If controlled, assign the value attribute to the current value on blur |
| 4893 | setDefaultValue(node, 'number', node.value); |
| 4894 | } |
| 4895 | |
| 4896 | /** |
| 4897 | * This plugin creates an `onChange` event that normalizes change events |