mozilla-mobile / firefox-ios

Firefox for iOS
Mozilla Public License 2.0
12.15k stars 2.91k forks source link

Tapping the top edge of the screen in landscape orientation does not scroll to the top of the page #12948

Open cpeterso opened 1 year ago

cpeterso commented 1 year ago

Steps to reproduce

  1. Load a long web page, such as https://en.m.wikipedia.org/wiki/Main_Page
  2. Hold the phone in portrait orientation.
  3. Scroll down the web page.
  4. Tap near the top edge of the display.
  5. The toolbar will appear.
  6. Tap near the top edge of the display again.
  7. The page will scroll back to the top of the page, as expected.
  8. Now rotate the phone to landscape orientation.
  9. Repeat steps 3-6 above.

Expected behavior

The page should scroll back to the top of the page, like it does in portrait orientation.

Safari scrolls to the top in landscape orientation, as expected.

Actual behavior

Nothing happens. The page does not scroll to the top of the page in landscape orientation in Firefox.

Chrome iOS doesn’t scroll to the top of the page in landscape orientation either, but Safari does. Maybe this is a bug or limitation in the WebView used by Firefox and Chrome?

Changing Firefox’s toolbar position from top to bottom has no effect on this bug.

Device & build information

┆Issue is synchronized with this Jira Task

data-sync-user commented 1 year ago

➤ Daniela Arcese commented:

This seems to be normal iOS pattern. You need the status bar (where the time shows) in order to trigger the scroll. Other native iOS apps, like Messages, also does not have this behaviour. I am going to change this to a feature request.

cpeterso commented 1 year ago

This seems to be normal iOS pattern. You need the status bar (where the time shows) in order to trigger the scroll. Other native iOS apps, like Messages, also does not have this behaviour. I am going to change this to a feature request.

Note that Safari implements this (non-standard?) behavior in landscape orientation without the status bar.

github-actions[bot] commented 6 months ago

This issue has been automatically marked as stale. Has the issue been fixed, or does it still require the community's attention? Please leave any comment to keep this issue opened. It will be closed automatically if no further update occurs in the next 30 days. Thank you for your contributions!

cpeterso commented 6 months ago

This feature request is still valid. Safari solves this issue by showing the toolbar at the top in landscape orientation, even if the toolbar is on the bottom in portrait mode.

Chrome also shows the toolbar on the top in landscape orientation, but tapping the landscape toolbar didn’t scroll to the top of the page.

cpeterso commented 4 months ago

Chrome iOS doesn’t scroll to the top of the page in landscape orientation either, but Safari does. Maybe this is a bug or limitation in the WebView used by Firefox and Chrome?

I retested Safari on iOS 17.4.1 and it no longer scrolls to the top of the page in landscape orientation. So Firefox now matches both Safari's and Chrome's behavior in landscape orientation.

So this issue is no longer a feature parity bug and is now a feature request to scroll to the top of the page in landscape orientation. 😁