PDA

View Full Version : Sencha touch 1.1 and Phonegap 1.2.0 - Keyborad don't hide on Android 2.x



JFFortierQc
13 Jan 2012, 8:50 AM
Hi
We face a problem using Sencha Touch and PhoneGap over Android 2.x where the Keyboard don't hide when you click outside the textfield (pure HTML textfield input type="text"). There is a works around for iOS and Android 3.x where you can simply set the elem.blur(); and the keyboard simply hide.

So we did a lots of test to find exactly where is the problem and when it appends. So here are our tests :

What we expect : On click anywhere else then the form element, the keyboard is supposed to hid by itself just like in a mobile browser.


Test 1
Using an HTML page on a server with Sencha alone or event with the Phonegap JS (PhoneGap JS is useless in this case), no problem.
Test 2Using an HTML page compiled with Phonegap and no other JS in the page else then PhoneGap JS, there is no problem.
Test 3
Using an HTML page compiled with Phonegap with the Phonegap JS and the Sencha JS (with or without Sencha CSS) : The keyboard on Android 2.x don't hide event after a elem.blur(), the Keyboard with iOS and Android 3.x hide only with elem.blur(); not by itself.
Test 4
Using an HTML page compiled with Phonegap without the PhoneGap JS, but with Sencha JS (with or without Sencha CSS) : The keyboard on Android 2.x don't hide event after a elem.blur(), the Keyboard whit iOS and Android 3.x hide only with elem.blur(); not by itself.

Tests result :
PhoneGap alone has no problem. Sencha alone over the web, seems to have no problem. But using Sencha Touch in an Application compiled with PhoneGap (with or without the PhoneGap JS) cause a Keyboard problem. The big problem is over Android 2.x where the Keayboard don't hide by itself and not even after a elem.blur();. For other Android 3.x and iOS 4.x and 5.x, the Keayboard don't hide by itself, but you can workaround it using a simple elem.blur();


So, is there any solution that can fix this for Android 2.x?

Or a better solution that simply reset the normal state which is exactly like the Web where the Keyboard is managed by itself on a click anywhere else then a field?