I have some input[type="text"] textboxes on my form that are sometimes not wide enough for the content that gets typed into them.
Currently, if a user types more text that fits (but is under maxlength), the textbox scrolls as you would expect. When they tab out of the textbox, the textbox stays scrolled to the "end" of what they typed.
I am trying to find a way to reset the textbox to the beginning when a user tabs out of the field.
I looked at the suggestion here:
http://stackoverflow.com/questions/512528/set-cursor-position-in-html-textbox
...but it does not work in an onblur event because the solution actually causes the textbox to get focus again briefly before bluring again which causes an infinite loop.
Before I give up, does anyone have any solution to resetting the cursor to the beginning of a textbox in an onblur event?