Last modified: 2012-02-24 02:52:09 UTC
We should be able to use the search button on the phone to do searches.
First filed at : https://github.com/nitobi/Wikipedia/issues/18
The event handler gets fired, and it seems to be legit calling focus() on the right element. There's already a comment in indicating that it's not working for some unknown reason... I tried calling it from a setTimeout callback, or blur()ing before focus(), no dice. A little experimenting (loading a link to a page with an input box on it, tapping into *that* input box to make sure something else was focused, and then hitting the 'search' button) seems to indicate that it *is* setting focus to the search field! However... it doesn't activate the soft keyboard. And if we were previously in another field with the keyboard open, the soft keyboard *closes*. wtf!
This PhoneGap plugin with an API to hide or show the soft keyboard might help: https://github.com/phonegap/phonegap-plugins/tree/master/Android/SoftKeyboard
added the soft keyboard plugin: https://github.com/nitobi/Wikipedia/commit/7e6102775d85864cae51b61b7aa4e7875ac927b1 when pressing the search button the keyboard will display, when the user types in the keyboard the characters & cursor then appear in the input field. the cursor doesn't appear in the input field if the hardware search button is pressed and the user doesn't enter any characters with the keyboard. still need to determine why the cursor isn't appearing when the focus() method is called.