New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Wild scrolling occurs when hiding popup on WP7 #4784

Closed
dtabaka opened this Issue Aug 1, 2012 · 9 comments

Comments

Projects
None yet
5 participants
@dtabaka

dtabaka commented Aug 1, 2012

I tested the popups on http://jquerymobile.com/demos/1.2.0-alpha.1/#/demos/1.2.0-alpha.1/docs/pages/popup/index.html on a Samsung Focus Windows 7.5.

The popups work, but when I touch outside the popup to close it, the page does a complete refresh.

@gabrielschulhof

This comment has been minimized.

Show comment
Hide comment
@gabrielschulhof

gabrielschulhof Aug 6, 2012

Contributor

I don't think that's a refresh, but a really ugly page jump.

Contributor

gabrielschulhof commented Aug 6, 2012

I don't think that's a refresh, but a really ugly page jump.

@gabrielschulhof

This comment has been minimized.

Show comment
Hide comment
@gabrielschulhof

gabrielschulhof Aug 8, 2012

Contributor

I don't really know what to do about this. For some reason, whenever I close the popup, and I'm assuming because of the window.history.back() that happens as part of the closing, for some reason, the browser jumps - on the popup/index.html page it jumps to (0,496) and on a simple page I created it jumps to (0,0). No idea why it does that, and I'm pretty sure it's not jQM doing it, because no window.scrollTo(x, y) code is executed when it happens.

Contributor

gabrielschulhof commented Aug 8, 2012

I don't really know what to do about this. For some reason, whenever I close the popup, and I'm assuming because of the window.history.back() that happens as part of the closing, for some reason, the browser jumps - on the popup/index.html page it jumps to (0,496) and on a simple page I created it jumps to (0,0). No idea why it does that, and I'm pretty sure it's not jQM doing it, because no window.scrollTo(x, y) code is executed when it happens.

@gabrielschulhof

This comment has been minimized.

Show comment
Hide comment
@gabrielschulhof

gabrielschulhof Aug 8, 2012

Contributor

I changed the summary to better reflect the problem.

Contributor

gabrielschulhof commented Aug 8, 2012

I changed the summary to better reflect the problem.

@gabrielschulhof

This comment has been minimized.

Show comment
Hide comment
@gabrielschulhof

gabrielschulhof Aug 8, 2012

Contributor

I tried to save the current window coordinates before creating the new history entry, and setting the left and top from the retrieved coordinates for the starting history entry, and right after the hashchange also for the new history entry, to be sure that both history entries have the same (left,top) coordinate for the window.

This hasn't helped. It seems that, on WP, the $( window ).scroll{Left,Top}() associated with the history entry is recorded once when the page appears, and it cannot be updated by any means later. Then, when navigation causes a given page to be redisplayed, the coordinates from the history entry are looked up and the page is displayed at those coordinates.

This scrolling does not occur on either Android 2.3.5 or iOS 5.1.1 ...

Contributor

gabrielschulhof commented Aug 8, 2012

I tried to save the current window coordinates before creating the new history entry, and setting the left and top from the retrieved coordinates for the starting history entry, and right after the hashchange also for the new history entry, to be sure that both history entries have the same (left,top) coordinate for the window.

This hasn't helped. It seems that, on WP, the $( window ).scroll{Left,Top}() associated with the history entry is recorded once when the page appears, and it cannot be updated by any means later. Then, when navigation causes a given page to be redisplayed, the coordinates from the history entry are looked up and the page is displayed at those coordinates.

This scrolling does not occur on either Android 2.3.5 or iOS 5.1.1 ...

@dtabaka

This comment has been minimized.

Show comment
Hide comment
@dtabaka

dtabaka Aug 8, 2012

Thank you for all your effort on this.

dtabaka commented Aug 8, 2012

Thank you for all your effort on this.

@toddparker

This comment has been minimized.

Show comment
Hide comment
@toddparker

toddparker Aug 9, 2012

Contributor

Could this be caused by the focus moving from the popup to the origin?

Contributor

toddparker commented Aug 9, 2012

Could this be caused by the focus moving from the popup to the origin?

@ghost ghost assigned Wilto Aug 9, 2012

@dtabaka

This comment has been minimized.

Show comment
Hide comment
@dtabaka

dtabaka Aug 9, 2012

I don't think so. If you download the Windows Phone 7.1 SDK, the Windows Phone Emulator gives a pretty accurate recreation of what I experience on the actual device.

dtabaka commented Aug 9, 2012

I don't think so. If you download the Windows Phone 7.1 SDK, the Windows Phone Emulator gives a pretty accurate recreation of what I experience on the actual device.

@gabrielschulhof

This comment has been minimized.

Show comment
Hide comment
@gabrielschulhof

gabrielschulhof Aug 13, 2012

Contributor

... as does a Nokia Lumia 800.

Contributor

gabrielschulhof commented Aug 13, 2012

... as does a Nokia Lumia 800.

@gabrielschulhof

This comment has been minimized.

Show comment
Hide comment
@gabrielschulhof

gabrielschulhof Aug 13, 2012

Contributor

I've had some really limited success fixing this with 5cc9723 ... the fix looks uglier than the problem :)

Contributor

gabrielschulhof commented Aug 13, 2012

I've had some really limited success fixing this with 5cc9723 ... the fix looks uglier than the problem :)

arschmitz added a commit to arschmitz/jquery-mobile that referenced this issue Oct 16, 2012

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment