diff --git a/lib/change.js b/lib/change.js index f1e5222..f38607e 100644 --- a/lib/change.js +++ b/lib/change.js @@ -99,6 +99,11 @@ module.exports = function reactTriggerChange(node) { // Property doesn't exist in React <16, descriptor is undefined. descriptor = Object.getOwnPropertyDescriptor(node, 'value'); + // react-select clears input on focus + if (type !== 'range') { + initialValue = node.value; + } + // React 0.14: IE9 // React 15: IE9-IE11 // React 16: IE9 @@ -117,7 +122,6 @@ module.exports = function reactTriggerChange(node) { if (type === 'range') { changeRangeValue(node); } else { - initialValue = node.value; node.value = initialValue + '#'; deletePropertySafe(node, 'value'); node.value = initialValue;