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