dgileadi / zepto-page-transitions

HTML5 Page Transitions similar to JQuery Mobile page transitions, but standalone (13k) and using Zepto.js
167 stars 46 forks source link

Jumping transition on new page if page two is shorter than page one #18

Closed Ruffio closed 11 years ago

Ruffio commented 11 years ago

In a multipage scenario the transition jumps when transitioning from one page to another, if the first page is scrolled down.

Let me try to explain. Let us asume that the first page is so long that you have to scroll down in order to hit the link that performes the transition. This is not unusual on mobile devices where the screen height can be limited.

When the transition is performed, page two is aligned with the top of page one and the transition is performed. If page two is shorter than page one, the transition is performed 'below page two' and therefor the plugin/browser jumps up to the top of page two.

A solution could be to get the position of current page (page one), offset page two and then perform the transition.

This issue is confirmed in both slide, fade.

The following link demonstrates the issue: http://mbrevis.com/admin/

If there is anything I can do/help with, please let me know.

Kindly regards Ruffio

dgileadi commented 11 years ago

Thanks for the bug report and example demonstrating it. I've committed what I hope is a fix; please let me know.

Ruffio commented 11 years ago

Thanks for the quick repsonse :-) The fix works as intended. Many thanks.