Closed Bug 696319 Opened 12 years ago Closed 12 years ago

Scroll web content input into view

Categories

(Firefox for Android Graveyard :: General, defect, P1)

ARM
Android
defect

Tracking

(firefox11 fixed, fennec11+)

VERIFIED FIXED
Tracking Status
firefox11 --- fixed
fennec 11+ ---

People

(Reporter: mfinkle, Assigned: kats)

References

Details

(Whiteboard: [VKB])

Attachments

(2 files, 1 obsolete file)

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
OS: Windows 7 → Android
Priority: -- → P1
Hardware: x86_64 → ARM
Assignee: nobody → kgupta
Update title as per discussion with mfinkle on IRC
Summary: Window is not resized when keyboard appears → Scroll web content input 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).
Attachment #569746 - Flags: review?(mark.finkle)
Attachment #569746 - Flags: review?(mark.finkle) → review+
https://hg.mozilla.org/projects/birch/rev/f905665bd9e5
Status: NEW → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
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.
Status: RESOLVED → VERIFIED
Whiteboard: [QA+] → [QA!]
Flags: in-litmus?(fennec)
Whiteboard: [QA!] → [QA+]
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().
Status: VERIFIED → REOPENED
Resolution: FIXED → ---
Whiteboard: [QA+] → [QA+], [VKB]
What really needs to be implemented here is allowing Gecko to trigger a scrollTo(), instead of only having Java able to trigger it.
Blocks: 694413
Attachment #578610 - Flags: review?(mark.finkle)
Attachment #578610 - Flags: review?(mark.finkle) → review+
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.
Attachment #578610 - Attachment is obsolete: true
Attachment #578700 - Flags: review?(mark.finkle)
Attachment #578700 - Flags: review?(mark.finkle) → review+
https://hg.mozilla.org/projects/birch/rev/85e665cc4a97
Status: REOPENED → RESOLVED
Closed: 12 years ago12 years ago
Resolution: --- → FIXED
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
Status: RESOLVED → VERIFIED
Flags: in-litmus?(fennec) → in-litmus+
Whiteboard: [QA+], [VKB] → [VKB]
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.
tracking-fennec: --- → 11+
Product: Firefox for Android → Firefox for Android Graveyard
You need to log in before you can comment on or make changes to this bug.