joehewitt / scrollability

Imitates iOS native scrolling in JavaScript.
http://joehewitt.github.com/scrollability
Other
1.78k stars 147 forks source link

Wrong behavior when switching to landscape mode and back #25

Open dfyx opened 12 years ago

dfyx commented 12 years ago

When you open the horizontal scrolling demo in portrait mode then rotate your iPhone by 90 degrees into landscape mode and back again, the position where the scrolling stops is too far to the right.

A similar problem appears when you open the demo while in landscape mode and then go to portrait mode.

The table scrolling demo works fine in both cases.

ghost commented 12 years ago

This issue seems to occur when you "resize" the browser window wich happens on landscape / portrait mode changes. If you an event listener (e.g. window.onresize) you can reload the page(s), but then you loose the page you're on.