fat / zoom.js

Medium's Image Zoom for jQuery
https://fat.github.io/zoom.js
MIT License
4.04k stars 332 forks source link

Overlay does not stop cursor changes or block click events. #18

Open davidklebanoff opened 9 years ago

davidklebanoff commented 9 years ago

To reproduce: If you zoom into an image that does not fill the full window and then mouse-over the location of a link (which is now hidden by the white overlay) the pointer cursor appears.

If the link/element has a click event (e.g. A bootstrap dropdown menu toggle, or any javascript listener) the link is also clickable through the overlay.

This is in contrast to the Bootstrap modal backdrop which acts as a curtain preventing click events and mouse cursor changes.

fat commented 9 years ago

hm yeah that shouldn't be the case, maybe i borked something - ill take a look

fat commented 9 years ago

this ~should~ fix the problem of underlying js firing https://github.com/fat/zoom.js/commit/213223bc81d178a09a36048032b7e9ef7c26588c

fat commented 9 years ago

Going to leave open while i sleep on the cursor issue

nielthiart commented 9 years ago

To reproduce: If you zoom into an image that does not fill the full window and then mouse-over the location of a link (which is now hidden by the white overlay) the pointer cursor appears.

If the link/element has a click event (e.g. A bootstrap dropdown menu toggle, or any javascript listener) the link is also clickable through the overlay.

I'm pretty sure this is simply because of the pointer-events: none; css rule on the overlay: css/zoom.css#L27.

If the overlay catches pointer events, you don't need all that click handling javascript.

fat commented 9 years ago

we need pointer events none