Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

hide URL bar does not work with TouchScroll demo #5

Open
rsaccon opened this issue May 8, 2010 · 7 comments
Open

hide URL bar does not work with TouchScroll demo #5

rsaccon opened this issue May 8, 2010 · 7 comments

Comments

@rsaccon
Copy link

rsaccon commented May 8, 2010

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

@davidaurelio
Copy link
Owner

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?

@rsaccon
Copy link
Author

rsaccon commented May 9, 2010

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 ?

@davidaurelio
Copy link
Owner

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 …

@rsaccon
Copy link
Author

rsaccon commented May 9, 2010

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

@davidaurelio
Copy link
Owner

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

@chrisdrackett
Copy link

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

@davidaurelio
Copy link
Owner

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants