| 4075 | } |
| 4076 | |
| 4077 | function handleControlledInputBlur(inst, node) { |
| 4078 | // TODO: In IE, inst is occasionally null. Why? |
| 4079 | if (inst == null) { |
| 4080 | return; |
| 4081 | } |
| 4082 | |
| 4083 | // Fiber and ReactDOM keep wrapper state in separate places |
| 4084 | var state = inst._wrapperState || node._wrapperState; |
| 4085 | |
| 4086 | if (!state || !state.controlled || node.type !== 'number') { |
| 4087 | return; |
| 4088 | } |
| 4089 | |
| 4090 | // If controlled, assign the value attribute to the current value on blur |
| 4091 | setDefaultValue(node, 'number', node.value); |
| 4092 | } |
| 4093 | |
| 4094 | /** |
| 4095 | * This plugin creates an `onChange` event that normalizes change events |