Skip to content
This repository

Hiding URL Bar Bug #150

Closed
soulrider911 opened this Issue December 05, 2011 · 8 comments

5 participants

Brady Sammons Matteo Spinelli zordon andrewminton praneetloke
Brady Sammons

I have been trying to triumph this issue for a long time with no resolve. So I figured I would post it here to see if in fact there is any way to solve this. Basically I would like to hide the URL bar in mobile safari as well as Android and have the I-scroll functionality still reside. However problems arise when you rotate the device to landscape and then back to portait view. What happens is you end up with a whole lot of space on the bottom of the page. Now, if I was to lock the devices to portrait mode only this problem would not be an issue. But, we need to be able to support landscape mode. I have a felling it has something to do with the way I-0scroll calculated the window height, and needs to be re-calculated upon returning to portait mode form landscape. Any hwlp on this would be awesome,i-scroll is a great product so far!

zordon
zordon commented July 18, 2012

same issue here, I wonder how gmail solved this.

andrewminton

Same here.. looking for a solution to this as well.

andrewminton

This might be of use to people if they are in need of hiding the native browser bar: http://blog.nateps.com/how-to-hide-the-address-bar-in-a-full-screen

praneetloke

Did you try calling refresh() on the iscroll instance that is responsible for that page? Listen for orientationchange event and call refresh in that. I am not sure if iscroll is already listening to that event and calling refresh() internally already.

zordon

I'm not working with iScroll with anymore but I found a solution by using the orientation callback and setting a ridiculous height amount like 9999px and then set back to the window height

on('orientationchange', function(){
$('body').height(99999);
setTimeout(function(){
$('body').height(window.innerHeight);
iscroller.refresh()
},300);
});

praneetloke

What happens when you don't set the height to the "ridiculous" value and just have the setTimeout?

zordon

the problem described in the first post, I had a big fight with this issue lol.

Matteo Spinelli
Owner

this is not something that should be handled by the iscroll script itself. The solution proposed by @zordon is valid, you don't need to make the height that high though. The page height must be scroller_height + urlbar_height.

Matteo Spinelli cubiq closed this August 15, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.