jackmoore / wheelzoom

A small script for zooming IMG elements with the mousewheel/trackpad.
http://www.jacklmoore.com/wheelzoom
MIT License
342 stars 95 forks source link

Image shifts during zoom if page is scrolled down #17

Closed aaugustin closed 8 years ago

aaugustin commented 8 years ago

If you open your demo page and use the mouse wheel on the image, the point under the cursor doesn't move.

If you scroll the whole page down a bit and then use the mouse wheel on the image, the point under the cursor moves.

The more you scroll the page, the more dramatic the effect.

Latest Firefox, OS X.

aaugustin commented 8 years ago

This is not reproducible on Safari or Chrome.

aaugustin commented 8 years ago

Using window.scrollX/Y instead of document.body.scrollLeft/Top seems to fix it.

jackmoore commented 8 years ago

Whoops, thanks!

jackmoore commented 8 years ago

I appreciate all the tickets, alway surprised when someone finds a use for this.

aaugustin commented 8 years ago

Thank you very much for the library and the quick fixes!