I am writing a small scroll widget for reading, similar to what you get in the iPhone app store, where the screenshot panel for the application is another, horizontally scrolling panel built into the main panel with vertical scrolling.
In all versions (including the full-size keyboard / mouse style on the computer), the panel occupies 100% of the width of the container, so it looks like a horizontal bar on the page.
In the version with a low-resolution touchscreen interface, that is, for smartphones, I want it to also change to the full height of the window, so that when you scroll it vertically, it can occupy the entire screen.
iPhone makes this difficult because $ (window) .height (), or as you want to request, seems to depend on whether the URL bar is visible.
Without a special code code, to find out if it is on the iPhone or adds a window scroll to the hacks to disable the URL, and then ask for the height, is there any way to ask Safari mobile: "what is the height window", which will give an answer on my 3GS 416 whether the URL bar is currently displayed or not?
I want to find a platform-neutral way to set for all major smartphones "what height can I set for this panel so that when scrolling to it it fills the entire browser window?"
Thank you, I fought off this a little, and here I dug myself out and could not find this specific information.
source share