Subject says it all. In testing a new page specifically tailored to mobile devices, I’m seeing an odd behavior: when the device is rotated from portrait to landscape layout, all of the content on the page jumps to the left. This almost always happens on the iPhone, and I sometimes see it on the Droid as well.
Worth noting: I’m implementing the iScroll script, and I have viewport settings to not user resizable (width is device width, magnification is 1.0).
When tracking x postion (offsetLeft), everything comes up 0.
My questions really are:
1. Under what circumstances can this happen?
2. Is there a way to detect that that an element (any element, or a specific element) is outside the viewport? If I can do that, I wouldn’t be any the wiser as to what the heck’s going on… but I can at least fix the problem.