mirror of
https://github.com/zoriya/react-native-web.git
synced 2026-06-01 10:07:35 +00:00
committed by
Nicolas Gallagher
parent
366f0e9923
commit
5f19b41928
@@ -261,7 +261,10 @@ const TextInput = forwardRef<TextInputProps, *>((props, forwardedRef) => {
|
|||||||
node.value = '';
|
node.value = '';
|
||||||
}
|
}
|
||||||
if (selectTextOnFocus) {
|
if (selectTextOnFocus) {
|
||||||
node.select();
|
// Safari requires selection to occur in a setTimeout
|
||||||
|
setTimeout(() => {
|
||||||
|
node.select();
|
||||||
|
}, 0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user