Answer the question
In order to leave comments, you need to log in
How to highlight text in input?
When you click on the input, you need to select the text inside, I do this
const onFocus = (e) => e.target.select();
<input onFocus={onFocus}>
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question