Using Opera Mobile (tried 9.5 and 10), I cannot get the cursor inside a textbox using Javascript.
I have a barcode scanner so I wanted to have the textbox auto focused so that it's ready to receive the automated barcode input without the user having to tap. Having to tap is not really the issue, if the scanner tries to scan when a textbox is not in focus, Opera navigates to a local 'Welcome to Opera' page, even when the homepage setting is changed.
I've tried:
- jQuery .focus()
- jQuery .live()
- Barebones Javascript .focus()
- The autofocus property in the input tag
- tabindex="-1" on the input tag
- putCursorAtEnd() found here
- Wrapping the above in a timer using setTimeout()
There's got to be a way to do ths with Opera Mobile. All other Javascript works no problem.