Receive mousemove events from iframe, too
You should look through combining parent document
event binding with document.getElementById('iFrameId').contentDocument
event, witch allows you to get access to iFrame content elements.
https://stackoverflow.com/a/38442439/2768917
function bindIFrameMousemove(iframe){
iframe.contentWindow.addEventListener('mousemove', function(event) {
var clRect = iframe.getBoundingClientRect();
var evt = new CustomEvent('mousemove', {bubbles: true, cancelable: false});
evt.clientX = event.clientX + clRect.left;
evt.clientY = event.clientY + clRect.top;
iframe.dispatchEvent(evt);
});
};
bindIFrameMousemove(document.getElementById('iFrameId'));
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!