Closed Bug 1947470 Opened 1 year ago Closed 11 months ago

hdfcbank.com - When typing in the support chat, it gets scrolled to the top

Categories

(Core :: Panning and Zooming, defect, P1)

Firefox 137
ARM
Android
defect

Tracking

()

VERIFIED FIXED
139 Branch
Webcompat Priority P1
Webcompat Score 8
Tracking Status
firefox135 --- unaffected
firefox136 --- unaffected
firefox137 --- wontfix
firefox138 --- verified
firefox139 --- verified

People

(Reporter: ctanase, Assigned: hiro)

References

()

Details

(Keywords: webcompat:platform-bug, webcompat:site-report)

User Story

platform:android
impact:workflow-broken
configuration:general
affects:all
branch:release
diagnosis-team:apz
user-impact-score:800
platform-scheduled:2025-06-30

Attachments

(8 files)

Environment:
Operating system: OnePlus 6 A6000 (Android 11)
Firefox version: Nightly 137.0a1-20250209212051, Beta 136.0-20250207091649, Release 135.0-20250130195129

Preconditions:
• Clean profile

Steps to reproduce:

  1. Go to https://www.hdfcbank.com
  2. Tap on "ASK EVA" button located at the bottom of the screen close to the center.
  3. Tap on the message box.
  4. Scroll up to make the message box visible again.
  5. Type something.

Expected Behavior:
The chat remains on the same position.

Actual Behavior:
The chat gets scrolled to the top, hiding the message box.

Notes:

  1. Screen rec attached
  2. There are 2 layouts for the chat, doesn't seem to affect this behavior
  3. Reproducible regardless of the ETP status
  4. Not reproducible on Firefox Release and Chrome
  5. Issue found during WebCompat team [Top100] websites testing
Severity: -- → S2
User Story: (updated)
Webcompat Priority: --- → P1
Webcompat Score: --- → 8
Priority: -- → P1

So I can reproduce once the chat is long enough. It seems we're scrolling the input into view, but it is covered by the dynamic toolbar. Hiro, you've recently looked at similar issues, can you take a look?

Flags: needinfo?(hikezoe.birchill)
See Also: → 1949319

Botond suggests that bug 1949319 is unlikely to be the cause of this.

No longer depends on: 1949319
Attached file A reduced test case
Flags: needinfo?(hikezoe.birchill)

As of this commit the new mochitest fails, it will suceed after the next
change.

Assignee: nobody → hikezoe.birchill
Status: NEW → ASSIGNED

A big difference of the new test is that it's testing on the root scroll
container which has been already scrolled to some extent.

Just like the original test, this new test doesn't work on Firefox
because of the lack of the support of touch actions.

(moving this to diagnosis-team:apz to reflect reality, since hiro's looking into this. Thanks, hiro!)

User Story: (updated)
See Also: → 1950744
User Story: (updated)

Removing needs-diagnosis flag since we have a diagnosis (and a proposed fix).

I am going to land only D239480 and D239482 since I'd like to fix bug 1950744 case in D239481 altogether.

Keywords: leave-open
Pushed by hikezoe.birchill@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/79a9ca542d3e Rename visual-scrollIntoView.html and add another variant of the test. r=dlrobertson https://hg.mozilla.org/integration/autoland/rev/583a00c3f77d Rename helper_zoomToFocusedInput_scroll_visually.html and add another variant of the mochitest. r=dlrobertson
Created web-platform-tests PR https://github.com/web-platform-tests/wpt/pull/51416 for changes under testing/web-platform/tests
Upstream PR was closed without merging

(In reply to Sandor Molnar[:smolnar] from comment #12)

Backed out for causing mochitest failures @ test_group_zoomToFocusedInput

Backout link: https://hg.mozilla.org/integration/autoland/rev/5389dad673aca26f9acf7df4d96e05f1ca1fae4a

Push with failures

Failure log -> TEST-UNEXPECTED-PASS | gfx/layers/apz/test/mochitest/test_group_zoomToFocusedInput.html | helper_zoomToFocusedInput_scroll_visually_bug1947470.html

On our Android environments, scrollTo(0, 1000) isn't sufficient to hit this bug's condition. (The window.innerHeight value was 1136px).

I changed it to scrollTo(0, 2000).

Flags: needinfo?(hikezoe.birchill)
Pushed by hikezoe.birchill@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/952cbe94a2c0 Rename visual-scrollIntoView.html and add another variant of the test. r=dlrobertson https://hg.mozilla.org/integration/autoland/rev/1c4f95d4f25e Rename helper_zoomToFocusedInput_scroll_visually.html and add another variant of the mochitest. r=dlrobertson
Upstream PR merged by moz-wptsync-bot

This case is similar to helper_scrollIntoView_bug1950744.html [1], a big
difference is that the position:fixed element is in view, but some part of
the element is overflowed from the layout viewport. Thus we fail to check [2]
whether the given position:fixed element is inside the visual viewport.

[1] https://searchfox.org/mozilla-central/rev/5fb48bf50516ed2529d533e5dfe49b4752efb8b8/gfx/layers/apz/test/mochitest/helper_scrollIntoView_bug1950744.html
[2] https://searchfox.org/mozilla-central/rev/7857ea04d142f2abc0d777085f9e54526c7cedf9/layout/base/PresShell.cpp#3847-3854

For safety, both of helper_scrollIntoView_bug1950744.html and
helper_scrollIntoView_bug1950744-2.html run with
layout.scroll_fixed_content_into_view_visually=true and
layout.scroll_fixed_content_into_view_visually=false because these tests
should NOT cause any scrolling regardless of the pref value.

Blocks: 1957028
See Also: → 1958103
Pushed by hikezoe.birchill@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/37668aab8da6 Add another variant test case. r=dlrobertson https://hg.mozilla.org/integration/autoland/rev/17ae8bd538ed Do MoveInsideAndClamp for the given position:fixed rectangle to avoid unexpected scrolling. r=dlrobertson https://hg.mozilla.org/integration/autoland/rev/1959c3b0822f Offset the target position:fixed element by the layout scroll offset. r=dlrobertson
Keywords: leave-open
Status: ASSIGNED → RESOLVED
Closed: 11 months ago
Resolution: --- → FIXED

Comment on attachment 9468212 [details]
Bug 1947470 - Offset the target position:fixed element by the layout scroll offset. r?dlrobertson

Beta/Release Uplift Approval Request

  • User impact if declined/Reason for urgency: A bank site is totally unusable, also sites such as bug 1950744 case keep broken
  • Is this code covered by automated tests?: Yes
  • Has the fix been verified in Nightly?: Yes
  • Needs manual test from QE?: No
  • If yes, steps to reproduce:
  • List of other uplifts needed: none
  • Risk to taking this patch: Low
  • Why is the change risky/not risky? (and alternatives if risky): We've already haven a mitigation that this code change doesn't affect on desktop at all (bug 1955158)
  • String changes made/needed: none
  • Is Android affected?: Yes
Attachment #9468212 - Flags: approval-mozilla-beta?
Component: Site Reports → Panning and Zooming
Product: Web Compatibility → Core
Target Milestone: --- → 139 Branch
Flags: in-testsuite+

Comment on attachment 9468212 [details]
Bug 1947470 - Offset the target position:fixed element by the layout scroll offset. r?dlrobertson

Approved for 138.0b6

Attachment #9468212 - Flags: approval-mozilla-beta? → approval-mozilla-beta+
Attached video chatissue.mp4

This issue is verified as fixed on Firefox for Android Nightly 139 (2025-04-13) and Firefox 138 Beta beta 6 under OnePlus 6T (Android 11) and Samsung S24 Ultra (Android 14). Confirming that the chat remains visible during the entire typing process.

You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: