cubiq/SwipeView

Problem with onload="setTimeout(function() { window.scrollTo(0, 1) }, 100);"

Opened this issue · 5 comments

Any solution to hide the url bar on load?

what is the problem? it doesn't seem swipeview related.

Sorry Matteo. Usually I just use to hide the browser chrome when someone visits the page, for more UI space on mobile, but there appears to be something in SwipeView that is preventing this from firing.

Hid my code:

<body onload="setTimeout(function() { window.scrollTo(0, 1) }, 100);">

probably your document doesn't have enough screen height to hide the url bar. Try to add a 100px padding-bottom to the body

Of course... Works fine, though I had to add the padding to the top to prevent a gap at the bottom.

You're the man, thank you. Do you know of a way to create a "handle" on the page if the user does want to return to the URL bar in this case? Without going inline? I may have to eventually go inline anyway, but I'm trying to see what my options are.

Thank you for creating SwipeView. It's by far the smoothest, butteriest implementation I've seen.