You found a bug! We've classified it as
We encourage you to continue the discussion and to find an acceptable workaround while we work on a permanent fix.
[2 - 2.1B2] Viewport is not expanding to full height after focus on address bar
1. Open any ST 2.x app (haven't tested with ST 1) on an Android 4(.0.3) device, e.g. the kitchensink:
Update: This issue is easy reproducable on Android 2 as well, see post #7 (http://www.sencha.com/forum/showthre...l=1#post883318)
2. Tap on the url in the address bar to select it and trigger the display of the keyboard. The keyboard will stay being displayed since the url is selected.
3. Hit the reload button
4. After the reload is done (make sure the keyboard is still shown) tap somewhere within the app to dismiss the keyboard
The viewport isn't expanded to its full height, only ~half of the app is visible. Space of keyboard is kept blank.
This also happens for apps with viewport: autoMaximize: true.
I can reproduce this from ST 2.0 till 2.1 beta 2.
Sencha Touch 2.0:
Sencha Touch 2.1 Beta 2:
Is this with the native browser or Chrome? I don't have a 4.0.x device, my 4.1 Nexus 7 works like a charm but it's also using Chrome.
Native browser. Don't have a 4.1 device, so not sure if it's happening there on the native browser.
I have such keyboard space issues also on Android 2 and in other cases, but this case was at least easily reproducible for me.
Think we all understand the native browser isn't the best but Chrome on Android is looking a lot better. We can still take a look at what we can do in this case.
Originally Posted by Steffen Hiller
Ok yes, thanks. I will concentrate on finding a reproducible case on Android 2.x where we're seeing similar keyboard space issues.
It seems that the reason for this behavior is that because the keyboard is shown since the beginning, Viewport's "stretchHeights" is set to the height that the viewport has while the keyboard is shown.
Once set, stretchHeights isn't reset (because of the "if (!height)" condition) throughout the app session.
I guess this is fixable, e.g. through the "resize" event that is fired when the keyboard is hidden.
On a side note,
it's a bit hard to fully understand the Default and Android viewport code since it isn't really documented and one of the more complex classes of ST.