mozilla-mobile / firefox-ios

Firefox for iOS
Mozilla Public License 2.0
12.23k stars 2.93k forks source link

Vertical scrolling while in landscape orientation causes unintentional jumps #20291

Open kloberle opened 6 months ago

kloberle commented 6 months ago

Steps to reproduce

  1. Open Firefox for iOS on an iPhone
  2. Visit, for example, the article about Firefox in Wikipedia
  3. Expand the Platform availability section to expose its tables (not a requirement)
  4. Scroll to the bottom of the article
  5. Turn phone to landscape orientation
  6. Scroll several screen-heights up the article, then scroll down the page

Expected behavior

The page will scroll smoothly up&down in both portrait and landscape orientation

Actual behavior

In landscape orientation, scrolling will often cause the page to jump unexpectedly, often to the bottom of the page. Can make navigating around a wide table very difficult.

Device & build information

Notes

Does not appear to be an issue on iPadOS.

┆Issue is synchronized with this Jira Task

data-sync-user commented 5 months ago

➤ Nishant Bhasin commented:

FYI: Matt Reagan

mattreaganmozilla commented 5 months ago

@kloberle I haven't been able to replicate this yet, does it happen consistently for you? I do see the scroll indicator will jump slightly (but this is expected due to the toolbar being shown/hidden, which changes the scroll view size). I haven't been able to see the page jump to the bottom as described in the ticket, however. Can you please try attaching a video of what you're seeing?

kloberle commented 5 months ago

Done; one is taken in Firefox, the other in Safari. I had subjectively believed this behaviour applied to multiple sites I visit, but in testing yesterday was only able to observe it for pages on Wikipedia -- so perhaps it's Wikipedia only? I only use Firefox in Private Browsing mode, and had the considered it might scroll properly in regular mode...however, the attached Firefox video was recorded in regular mode. Thanks.

data-sync-user commented 5 months ago

➤ Matt Reagan commented:

(Attaching video provided by reporter)

!FireFox.mp4|width=888,height=1920,alt="FireFox.mp4"!

data-sync-user commented 4 months ago

➤ Alexandru Farcasanu commented:

I can easily reproduce this issue but only on iPhones.

What I found:

When we rotate the screen, scrollView.contentOffset.y have the same value, so that is normal but the problem is with the Wikipedia page format. (as my first conclusion) (on landscape and portrait)

On portrait we can see the Mozilla Firefox details below the introduction text but on landscape, this details are on the right side and that may cause this issue. Our scrollview position is the same but the wikipedia page height is changed. One more mention: Chrome have exactly the same behaviour as on FF but on Safari everything is working well.

Matt Reagan do you think we can handle something here?

!portrait.png|width=439,height=889,alt="portrait.png"!

!landscape.png|width=2796,height=1290,alt="landscape.png"!

data-sync-user commented 3 months ago

➤ Alexandru Farcasanu commented:

After a discuss with Matt Reagan, I will un-assign this ticket.

kloberle commented 3 months ago

After a discuss with Matt Reagan, I will un-assign this ticket.

To be reassigned to someone else, or?

I just bumped into this issue yet again today.

data-sync-user commented 3 months ago

➤ Matt Reagan commented:

{quote}I can easily reproduce this issue but only on iPhones.

One more mention: Chrome have exactly the same behaviour as on FF but on Safari everything is working well.{quote}

Can anyone (cc Alexandru Farcasanu) possibly clarify the impact of this bug? Is it widely reproducible during browsing or is it limited to a few specific websites? In any case it sounds like this needs additional investigation (Norberto Andres Furlan ) to determine the best solution.

data-sync-user commented 3 months ago

➤ Norberto Andres Furlan commented:

Alina Moldovan can you provide more context on this one? Thanks!