Scroll web content input into view

VERIFIED FIXED

Status

()

Firefox for Android
General
P1
normal
VERIFIED FIXED
6 years ago
a year ago

People

(Reporter: mfinkle, Assigned: kats)

Tracking

unspecified
ARM
Android
Points:
---
Dependency tree / graph
Bug Flags:
in-litmus +

Firefox Tracking Flags

(firefox11 fixed, fennec11+)

Details

(Whiteboard: [VKB])

Attachments

(2 attachments, 1 obsolete attachment)

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
Whiteboard: [QA+]
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
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).
Attachment #569746 - Flags: review?(mark.finkle)
(Reporter)

Updated

6 years ago
Attachment #569746 - Flags: review?(mark.finkle) → review+
https://hg.mozilla.org/projects/birch/rev/f905665bd9e5
Status: NEW → RESOLVED
Last Resolved: 6 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.

Comment 6

6 years ago
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!]

Updated

6 years ago
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]

Updated

6 years ago
Duplicate of this bug: 701687
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
Depends on: 707132
Created attachment 578610 [details] [diff] [review]
Pop the text input field into view
Attachment #578610 - Flags: review?(mark.finkle)
(Reporter)

Updated

6 years ago
Attachment #578610 - Flags: review?(mark.finkle) → review+
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.
Attachment #578610 - Attachment is obsolete: true
Attachment #578700 - Flags: review?(mark.finkle)
(Reporter)

Updated

6 years ago
Attachment #578700 - Flags: review?(mark.finkle) → review+
https://hg.mozilla.org/projects/birch/rev/85e665cc4a97
Status: REOPENED → RESOLVED
Last Resolved: 6 years ago6 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+
status-firefox11: --- → fixed
You need to log in before you can comment on or make changes to this bug.