lukehaas / Scrollify

A jQuery plugin that assists scrolling and snaps to sections.
MIT License
1.8k stars 579 forks source link

Scrolling doesn't hide / minimize the address bar on phones #306

Open agilbert opened 6 years ago

agilbert commented 6 years ago

Tested in iOS Safari 11 and Chrome 64.

The default scrolling behavior for both of these browsers is to minimize the address bar when the user begins scrolling. In the case of safari, there is also the toolbar at the bottom of the screen that also gets minimized when the user scrolls.

ezgif-4-d36aea8930

When scrollify is in use, the minimize behavior is not triggered. At first I thought this was an issue with my implementation but the same issue is present in the demos.

ezgif-4-8235bb6f90

Is there a known workaround or method to tell the browser, "hey the page is scrolling hide the UI now"?

himerus commented 6 years ago

I'd like to see some recommendations here as well.

I'm working on an implementation where I've set setHeights: false, as I'm handling the sizing of the 'page sections' myself, and on iOS Safari, the height: 100vh is calculated as if the UI is in minimal mode (without bottom toolbar, and minimized address bar). So I'm forced to scroll a 'few' pixels to the bottom of the section before scrollify moves me to the next section.

I was previously looking at how to hide the UI, but Apple killed the minimal-ui viewport property in iOS 8, and I've not tested https://github.com/gajus/brim to know if it's a viable solution to hide the UI.

This is also a similar issue: https://github.com/lukehaas/Scrollify/issues/194

mveer-agarwal commented 5 years ago

HI Team, Any update on the issue?