Skip to content Skip to sidebar Skip to footer

Iframe Obstructing The Mousemove Event From Occuring

I attached an event on body. But a transparent Iframe appears on the body behind the popup. I want to call that mousemove event on the body, so that the popup disappears as soon as

Solution 1:

I've had an issue with this before. What happens when you add an iframe to the body is that events that would normally be sent to the body like mousemove are being obstructed by that iframe.

I've fixed this by adding a absolute positioned div with 100% height and width over the iframe, whenever the popup opens. This div should have a higher z-index as the iframe.

Instead of listening to mousemove on the body you could then listen to the div. Remove the div whenever you are closing the popup.

Post a Comment for "Iframe Obstructing The Mousemove Event From Occuring"