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

Zoom position is incorrect when you need to scroll page down to the swiper #3351

Open
acromatica opened this issue Nov 25, 2019 · 1 comment
Open

Comments

@acromatica
Copy link

@acromatica acromatica commented Nov 25, 2019

This is a (multiple allowed):

  • bug

  • enhancement

  • feature-discussion (RFC)

  • Swiper Version: 5.2.1.

  • Platform/Target and Browser Versions: macOS Chrome 78.0.3904.108, IOS 13.1.3 Safari.

  • Live Link or JSFiddle/Codepen or website with issue: https://codepen.io/acromatica/pen/VwZydyR.

What you did

Add a swiper with zoom to a page that has any content (or just empty space) above the swiper.

Expected Behavior

When you double click or double tap an image from swiper it should zoom clicked area of image, for example top right corner of the image.

Actual Behavior

Bottom half of the image gets zoomed.

https://www.dropbox.com/s/9zxg5tf2n3eljpo/zoom-position.mov?dl=0

@acromatica

This comment has been minimized.

Copy link
Author

@acromatica acromatica commented Nov 26, 2019

It looks like gesture.$slideEl.offset().top returns incorrect value (document scroll always returns 0).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
1 participant
You can’t perform that action at this time.