Dealing with a similar issue in the past, I discovered that inserting an iframe
into the body
caused events that should be directed to the body—such as mousemove—to be intercepted by the iframe.
To address this problem, I implemented a absolutely positioned div
with full height and width covering the iframe whenever the popup appeared. This div
needed to have a higher z-index than the iframe
.
Instead of monitoring mouse movements on the body
, it's more effective to track them on the div
. The div
can then be removed when the popup is closed.