Skip to content
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

[BUG] Image jump when scrolling to close PhotoSwipe lightbox #1492

Closed
jimblue opened this issue Feb 25, 2018 · 6 comments
Closed

[BUG] Image jump when scrolling to close PhotoSwipe lightbox #1492

jimblue opened this issue Feb 25, 2018 · 6 comments

Comments

@jimblue
Copy link

jimblue commented Feb 25, 2018

Hi @dimsemenov,

You can check this bug on your demo page by simply open an image and scroll down.

You'll notice that the image do not return to the exact placeholder position then jump to it.

I found another library that have the same zooming effect without this bug you should have a look:

https://desmonding.me/zooming/

You can maybe found the fix inside the code.

Cheers

@HunterGraubard
Copy link

I can confirm this.

@jimblue
Copy link
Author

jimblue commented Jun 19, 2018

Hi @dimsemenov !

Can we have your input on this?

Thanks

@gorgoserio
Copy link

You need to delay the unbind of the scroll listener until the close animation finish.
Change this code inside the function _unbindEvents in photoswipe.js:

framework.unbind(window, 'resize scroll orientationchange', self);

to:

setTimeout(function () {
     framework.unbind(window, 'resize scroll orientationchange', self);  
}, 400);

@jimblue
Copy link
Author

jimblue commented Dec 17, 2018

Thanks @gordonwes! I'm gonna try your fix asap

@jimblue
Copy link
Author

jimblue commented Apr 8, 2019

Just been testing your solution @gordonwes and it's working great 😄

@dimsemenov, is it possible to create a new release with a fix so we can close this issue?

Thank you so much!

@jimblue
Copy link
Author

jimblue commented Mar 29, 2020

This bug is almost 1 year old so I am wondering... is this lib still maintain?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants