Receive mousemove events from iframe, too

前端 未结 6 1179
被撕碎了的回忆
被撕碎了的回忆 2020-12-03 08:17

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 wa

6条回答
  •  猫巷女王i
    2020-12-03 09:03

    Though pointer-events: none; in the styles for the frame can solve this problem,but it disabled any other events in iframe,my solution is to toggle the value like:

    {{pointer-events : isMoving? 'none' : 'all' }}
    

提交回复
热议问题