When the software keyboard appears, the window is not resized, so I can't pan to the bottom of content. http://bugzilla.mozilla.org was my test page
Update title as per discussion with mfinkle on IRC
Created attachment 569746 [details] [diff] [review] Scroll any focused input/textarea elements into view Additional test case at http://people.mozilla.org/~kgupta/bug/696319.html if needed (scroll to bottom and put focus on the text field, ensure it remains visible when the virtual keyboard comes up).
Any idea why focused.scrollIntoView(false) from this fix would not work on the mobile.southwest.com? STR: open that site, select Air Reservations -> Book Air, try to enter the Promotion Code at the bottom of the page - it doesn't scroll into view, though the method is called.
Not really sure. It works fine on the desktop browser (if I throw up the Firebug console so that it hides the text field, and then do document.getElementById("textfieldpromocode").scrollIntoView() it will scroll into view. Also on mobile it does seem to scroll the page to a particular point, it just doesn't scroll to the *right* point, so I'm guessing that there's a regression in the layout code that makes gecko think the text input box is somewhere different than it actually is.
Build ID: Mozilla/5.0 (Android; Linux armv7l; rv:10.0a1) Gecko/20111108 Firefox/10.0a1 Fennec/10.0a1 - Native Fennec build Device: HTC Desire Z - Android 2.3 Verified bug on mobile.southwest.com, http://bugzilla.mozilla.org and test page from comment2. When focus on a text field(anywhere on the page:top, bottom, middle) virtual keyboard is opened and text field remains visible with focus on text field.
This fix was in GeckoSurfaceView, and now needs to be reimplemented for the latest pan/zoom layers architecture. Probably just need to send the same "ScrollTo:FocusedInput" message from LayerView.setScreenSize().
What really needs to be implemented here is allowing Gecko to trigger a scrollTo(), instead of only having Java able to trigger it.
Created attachment 578610 [details] [diff] [review] Pop the text input field into view
Created attachment 578700 [details] [diff] [review] Pop the text input field into view (v2) While debugging bug 707285 I realized my first patch also had a race condition, and could call scrollIntoView() before the browser element had been resized, so the scrollIntoView() would effectively be a no-op. Patch updated to fix that by ensuring the scrollIntoView() always happens afterwards. I was able to consistently repro the problem by increasing the throttle timer from 350ms to 3500ms to force it into that state. I also changed the isIMEEnabled() method to check for != DISABLED instead of == ENABLED since passwords are a separate state there and the first patch didn't work on password input fields.
verified fixed on: Build ID: Mozilla/5.0 (Android; Linux armv7l; rv:11.0a1) Gecko/20111207 Firefox/11.0a1 Fennec/11.0a1 - Native Fennec build Device: Samsung GalaxyS, Android 2.2 TC created: https://litmus.mozilla.org/show_test.cgi?id=40447
Catalin please check to make sure we have a test case that covers scrolling an input into view when a letter is tapped on a keyboard.