Focus problem demo

Enter or change some data in the "first" text box. When you leave the box the focus problem will be evident. I cannot return the focus to the text box, the cursor will be in another textbox if you press the tab key or click another field. Oddly in Gecko browsers any content in first will be selected, but the cursor will not also be there. It does work in Opera, and use to work in old Netscape 4.x, but it won't here because I am initializing the fields with getElementById. Who uses NN4 ;-)

A workaround that does work is to delay the firing of the field's focus(), but by being indirect all fields need IDs. Test box "second" demonstrates this.

Of course there is not problem moving focus when calling from another field. Click the button and "third" will get the focus and any content selected