Closed Bug 1666065 Opened 4 years ago Closed 4 years ago

[Bug]Tapping in text input field in iframe in modal causes entire contents on screen to shift downward half+ page

Categories

(GeckoView :: IME, defect)

Unspecified
Android
defect

Tracking

(firefox83 fixed)

RESOLVED FIXED
83 Branch
Tracking Status
firefox83 --- fixed

People

(Reporter: ekager, Assigned: emilio)

Details

Attachments

(1 file)

From github: https://github.com/mozilla-mobile/fenix/issues/15208.

Steps to reproduce

I can reproduce this bug often, but not 100% of the time. We created some simplified test pages in order to demonstrate the bug. Clear all browser data if you cannot reproduce, and/or change the 1 in the url below to 2, 3, or 4 (different versions of the same issue).

  1. Open Firefox (v79 or later) on an Android device
  2. Type (or paste) the following URL into the URL bar: https://www.fark.com/test/ff79-android/simpleiframe1.html
  3. Click or tap in the text input field

Expected behavior

The contents of the main page should remain where they are. A modal should be overlayed over the center portion of the main page. Clicking or tapping in the text input field should make no change to the content of the page other than placing a cursor in the box and allowing the user to type.

Actual behavior

Clicking or tapping in the text input field causes the contents of the entire page (original page and modal overlay) to shift downward by anywhere from half to three-quarters of a page. It's difficult to describe, but I have a video at https://www.fark.com/test/ff79-android/ff79android.mov

Device information

The screen recording above is from the following setup:

  • Android device: Android x64 0.0-r2 in a VM
  • Fenix version: Nightly 200918 15:19 (Build #2015764671)

However, we have asked other users to test on various other Android devices and all had the same issue if they were running FF79 or FF80 beta.

Other Information

The URL above (simpleiframe1.html) uses CustomBox to display a modal. We also tried two other 3rd party modal frameworks as well as one with plain javascript. All have the same isue.
https://www.fark.com/test/ff79-android/simpleiframe1.html
https://www.fark.com/test/ff79-android/simpleiframe2.html
https://www.fark.com/test/ff79-android/simpleiframe3.html
https://www.fark.com/test/ff79-android/simpleiframe4.html

The bug only seems to occur when the modal contains an iframe. We have other test page that do not contain an iframe, and the issue doesn't occur. Here are the same pages with an iframe, that are fine:
https://www.fark.com/test/ff79-android/simplenoiframe1.html
https://www.fark.com/test/ff79-android/simplenoiframe2.html
https://www.fark.com/test/ff79-android/simplenoiframe3.html
https://www.fark.com/test/ff79-android/simplenoiframe4.html

The problem can be reproduced in a new Firefox profile.
The problem can be reproduced with the latest nightly build - Build ID 2015764671

This is my first Mozilla bug report so apologies if I missed anything. Please let me know if there is any extra information I can provide that would be useful.

Emilio I know you did a change about this a while back, any ideas what could be going on here?

Flags: needinfo?(emilio)

I haven't been able to reproduce this, but just to double-check this is related, does apz.zoom-to-focused-input.enabled=false fix it for you?

I think this check is not quite perfect if the subdocument itself is fixed-positioned, which seems to be the case here.

I haven't been able to repro the issue so I'm not quite sure how to test
this...

Assignee: nobody → emilio
Status: NEW → ASSIGNED

can you confirm that the patch fixes it if you can repro?

Flags: needinfo?(emilio) → needinfo?(agi)

Ugh can't repro either. Asked the reporter on Github https://github.com/mozilla-mobile/fenix/issues/15208#issuecomment-698477422

Thanks for the patch Emilio!

Flags: needinfo?(agi)
Pushed by ealvarez@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/8bb82b8edbf7
Make ZoomToFocusedInput() handle fixed-pos subframes of the RCD. r=botond
Status: ASSIGNED → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → 83 Branch

Moving some input bugs to the new GeckoView::IME component.

Component: General → IME
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: