If you visit this page on your iPad device on the latest version of iOS you can follow along.
http://fiddle.jshell.net/will/8VJ58/10/show/light/
I have two elements with the new -webkit-overflow-scrolling: touch; property and value applied. The left hand grey area has plenty of content and will scroll in portrait or landscape. The right will only scroll in landscape.
If you start in landscape (refresh in landscape) you can scroll both areas with the inertia scrolling. Works great. Now flip your iPad into portrait and only the left hand area will scroll. This is as intended. But when you flip back to landscape the right hand area will no longer scroll at all, whereas the left hand area is fine still.
It's obvious how to stop this happening, but I don't always have the content to fill the area.
So any ideas?
Thanks in advance,
Will :)
Coming late with a similar, but simpler solution.
[EDIT] Watch out, after experimenting (a lot), I found out that
display:none
declarations will surely break thewebkit-overflow-scrolling: touch
feature. Never use it on elements (or parents of elements) that are supposed to support touch scrolling.I experienced the same bug on iPhone, iPod and iPad. This is not restricted to the latter only.
I tried everything that was suggested to be a solution, but eventually the sweet combination ended up being detaching the element, appending it to its container and explicitly assigning it its own height while doing this, like so:
I am actually having the exact same issue. I have narrowed it down to the fact that it affects DIVs whose content's no longer require scrolling when the orientation is changed.
In your example. The DIV on the right scrolls in landscape, does not NEED to scroll in portrait, but then needs to scroll again. I have tested this when both DIVs (left and right) need to scroll regardless of orientation and its not a problem.
UPDATE:
I actually seem to have fixed this!
The issue appears to be a timing issue. During resize the inner content is not big enough to warrant scrolling on the outer DIV that has overflow. After wasting a day on this, I finally came up with this hack:
Here is my logic whenever the page resizes:
I was able to use a known "fix" to force an iOS6 redraw to correct this issue without having to use setTimeout.