Receive mousemove events from iframe, too

Van Coding picture Van Coding · Mar 10, 2011 · Viewed 21.1k times · Source

I have a javascript app, whichs adds a mousemove listener to the document. Problem: When the mouse is moved over an iframe, the function is NOT called.

Is there a way to pass through such events to the root document?

Answer

cloudonshore picture cloudonshore · Apr 19, 2011

Put pointer-events: none; in the styles for the frame.

I was having this problem myself and found this solution works great and is so simple!