-
Notifications
You must be signed in to change notification settings - Fork 164
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
Zoomed images cause overflow #75
Comments
Thank you for reporting this bug! I think this issue appears because we rely on Do you want to contribute and fix this issue? Let me know if you need help with anything (you can start by reading the contributing guide). |
I fixed it like this (with jQuery):
I don't know, correct it is or not, but it works. |
@francoischalifour Thanks for the suggested fix. I've made on a fork and it seems to work. However I think the requirements for the contribution guidelines are beyond my abilities. Happy to PR for the two lines of changes, but won't be able to add tests. |
Feel free to send the PR, I'll take care of the rest! |
Fixes issue where scrollbars are visible but not accounted for in the measured width. Closes #75.
Bug description
If you zoom an image with 0 margin and scrollbars enabled, the resulting image is too wide by the width of a scrollbar and causes a horizontal scrollbar to appear.
This causes two issues:
Here's a gif from the demo site:
How to reproduce
Visit demo site and zoom first image with scroll bars (vertical) already visible. When zoomed, a horizontal scrollbar will appear.
Expected behavior
The image should fill the visible area.
Environment
Observed in Chrome and Safari on Osx 10.13.4.
Other.
Possibly related, when a margin is set the position of the image doesn't take account of the scrollbar (if it's visible). For small margins, this causes the image to appear off-centre.
Example:
This image has a 20px margin. Because of the scrollbar, it appears off-centre.
The text was updated successfully, but these errors were encountered: