I have the textarea
and the input below it. When I select some text from textarea
and click on the input
, then my selection disappears. How can I make it still visible?
<textarea style="width: 500px; height: 500px">
Test data
</textarea>
<input> </input>
2
Answers
Copied everything you provided into a HTML editor and I didn’t run into this issue. If this is all you’ve got, you need to put it into the body or a header or something, but if you have more code written your issue is more than likely in there.
You need to save the selection and restore it (on
blur
andfocus
).