TouchScroll icon indicating copy to clipboard operation
TouchScroll copied to clipboard

hide URL bar does not work with TouchScroll demo

Open rsaccon opened this issue 14 years ago • 7 comments

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);

rsaccon avatar May 08 '10 17:05 rsaccon

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?

davidaurelio avatar May 09 '10 17:05 davidaurelio

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 ?

rsaccon avatar May 09 '10 17:05 rsaccon

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 …

davidaurelio avatar May 09 '10 18:05 davidaurelio

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 ...

rsaccon avatar May 09 '10 23:05 rsaccon

I’ll have a look at it, because I think I will need this myself one day …

davidaurelio avatar May 10 '10 06:05 davidaurelio

Yeah, I'm running into the same thing. We'll let you guys know if we find a solution

chrisdrackett avatar May 13 '10 19:05 chrisdrackett

Cool, thank you. I’ll solve the other issues popping up here first.

davidaurelio avatar May 14 '10 06:05 davidaurelio