Bug 191017 - Provide a way for scrollToTop via status bar tap to apply to an element other than the body
Summary: Provide a way for scrollToTop via status bar tap to apply to an element other...
Status: NEW
Alias: None
Product: WebKit
Classification: Unclassified
Component: Scrolling (show other bugs)
Version: WebKit Nightly Build
Hardware: iPhone / iPad All
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-10-28 17:37 PDT by Eric Steinlauf
Modified: 2019-06-16 21:01 PDT (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Eric Steinlauf 2018-10-28 17:37:30 PDT
Normally, a tap on the status bar causes a page to scroll to the top. This is consistent with UIScrollView behavior throughout iOS.

An native app can determine which scroll view scrolls on scroll-to-top gesture as controlled by scrollsToTop:
https://developer.apple.com/documentation/uikit/uiscrollview/1619421-scrollstotop

In WebKit, only the body can scroll to top. Sometimes the main content of the page is an other scrolling element. For example photos.google.com when signed in does not scroll the body. As a result, double tapping the status bar does not scroll the page.

It would be helpful to have a way to receive this event and handle it with JS or to specify which element should scroll instead of body.