-
Notifications
You must be signed in to change notification settings - Fork 2.4k
Possible bug in resetActivePageHeight #7322
Comments
iOS 6.1.x |
WP8 - much, much worse |
seems fine in iOS 7 |
@arschmitz Have you tried both in the browser and as a fullscreen app? |
no this issue does not mention fullscreen |
Good point! I'll add it to the description. |
i don't see anything in fullscreen either though |
@arschmitz In fact, it seems that fullscreen mode on iOS 7 is the only one that works correctly. By that I mean that, when the vkb pops up, the page actually becomes shorter so that no scrolling is necessary even with the vkb up. This is what should be happening on all platforms since, even with the vkb up, the viewport is sufficiently tall to accommodate the button and the two text inputs. |
no thats not what it does on iOS 7 the page height does not change based on |
@arschmitz Is this not what you're seeing on fullscreen iOS7? |
IOW, the page is not tall enough to scroll when there's no VKB, and it's also not tall enough to scroll when there's a VKB on screen. Actually, I should set a border on the page to see whether the page is behind the VKB, or whether the viewport is actually reduced. |
the viewport is reduced this is why fixed elements slide up with the keyboard |
Yes, the viewport is reduced, and the page height reflects the new viewport height. Not so anywhere else. |
Everywhere else, the page height is set such that, when the vkb is up, the page can be scrolled. |
i cant view your video |
Grrr! I'll youtube it. |
the video is private |
Oh, fer cryin' out-loud. |
Should be good now. |
@arschmitz Look at http://jsbin.com/IFolanOW/392/ in the browser vs. fullscreen. In the browser, after the vkb pops up, the page goes on behind the vkb, whereas in fullscreen, the page is resized to the new viewport. I need to figure out if, in the browser, the page has the size it has because there's no resize event, or, because we're setting the height to the former viewport height in resetActivePageHeight. |
I mean, look at it on iOS 7. |
OK, on iOS 7 Safari, the browser does not tell us that the VKB has appeared. On iOS 7 fullscreen, the browser tells us that the viewport is now smaller and we correctly compensate. If you switch between the inputs while the VKB is active, nothing happens. |
On iOS 6 Safari, you click on the first input, the vkb appears, and no resize events happen. But, if you click the second input while the VKB is up, you get a pile of resize events, and you keep getting them long after the second input has received focus and things appear quiescent. The final two resize events have the same size, so it appears that the viewport is slowly approaching that size. If you dismiss the vkb, you get another resize but now your page height is such that it fits only if the location bar is visible. IOW, iOS 7 is much saner. |
iOS 6 fullscreen is saner too. It simply doesn't issue any resize events whatsoever in response to vkb appearance/disappearance. |
OK, so it seems on iOS 6 Safari and on WP8 (at least), when we resize the page to the height of the viewport, /something/ is causing the document to be taller than the page, causing scrolling. |
More steps to reproduce:
On WP8 and iOS 6 you will find that there are instances when the HTML and the BODY exceed the page height. There's no reason for this, since the only box inside the HTML is the body, and the only box inside the body is the page. |
For the record: Android (2.3.5 physical, 4.0 and 4.4.2 emulated) is rock-solid in this regard. It always resizes the window when the vkb appears, and there are never any "stragglers" - i.e., elements whose height exceeds the viewport size. |
WP7.5 also works surprisingly well. |
Do not set min-height if the existing height is good enough. This fixes iOS 6.1, but not WP8. Fixes gh-7322
http://jsbin.com/IFolanOW/391/
Steps to reproduce:
Sometimes the bottom of the page does not coincide with the bottom of the document. I painted the page pink to make the difference visible.
Please also repeat the steps after having added the above URL as an app to your home screen and see if you get the error under those circumstances.
The text was updated successfully, but these errors were encountered: