jsfiddle: http://jsfiddle.net/ztNHL/3/
Select the top input, and then tab to the second. It will put your cursor at the end of the value, rather than selecting all. if you remove the javascript and run again, you can see this behavior doesnt happen.
Clueless.
Some other modifications I made:
\dalias)