How to hide the address bar in mobile safari for a 100vh app?

13 Views Asked by At

Safari address bar is pretty large, it works by disappearing when starting to scroll. How to hide it for an interactive app that is always 100vh (or dvh)?

One workaround is only for mobile safari users: initialise app with 115vh, display prompt 'scroll to start an app', then add event on touchend window.scrollTo(0, 0) , and set very short timeout document.body.style.height = '100dvh'.

I am looking for something more reliable.

0

There are 0 best solutions below