TouchScroll
TouchScroll copied to clipboard
hide URL bar does not work with TouchScroll demo
I have tried to add URL Bar hiding at load on orientation change events. But it does not work. I did not find hard-coded "height" dimensions as possible reasons. The approach choosen to hide the URL bar is a delayed window.scrollTo :
setTimeout(function() { window.scrollTo(0, 1); }, 100);
Hey rsaccon. I think hiding the scrollbar is out of the scope of the demo. The purpose is to show the scroller and how to do a layout using display: -webkit-box
. Is there any reason why the demo should hide the urlbar?
Of course there is no need to hide the scrollbar specific for this demo. However the question is why does the standard approach for hiding iPhone URL bar NOT work here ?
Ok, now I understand better. Just how you assumed, there is no explicit height. I used height: 100%
for html, body, #chrome, #demo
. However, the window.scrollTo()
-technique needs the contents to be bigger than the viewport. Maybe adding #body { margin-bottom: 41px }
would be sufficient …
I tried with: body { margin-bottom: 60px }, now UrlBar hides, but .scroller does not resize to increased height, seems to be tricky to get it right ...
I’ll have a look at it, because I think I will need this myself one day …
Yeah, I'm running into the same thing. We'll let you guys know if we find a solution
Cool, thank you. I’ll solve the other issues popping up here first.