Place Cursor at Beggining

Hi Experts,

Is it possible to place the cursor at the beginning when a text box receives focus?

Thank you
APD TorontoAsked:
Who is Participating?
 
Steve BinkCommented:
Using setSelectionRange, this should work:
my_text_input.setSelectionRange(0,0);

Open in new window

This examination of the strategy reported some issues, but it was written four years ago...  Some experimentation will be necessary to understand if any of their caveats apply now.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.