tristen / hoverintent

:mouse: Fire mouse events when a user intends it
https://tristen.ca/hoverintent/
MIT License
331 stars 54 forks source link

Not working properly or at all with iframe element #37

Open alantos opened 2 years ago

alantos commented 2 years ago

I only added properly in the title as it is working in some cases in Chrome (depends which edge your cursor crossing and also from interval option - higher interval works worse)

Best to reproduce that in Firefox where it is not working at all.

Iframe has to be without a borders.

Main cause is in mousemove event, as it is not triggered when moving cursor above iframe content. It can be triggered when iframe has a border but I think it is because it belongs to actual document and not to the iframe document.

Here is jsfiddle with issue reproduced https://jsfiddle.net/zejrqg73/1/.

I have tried to use StackBlitz but it has a problem with Firefox.

I do have a fix proposition so I will put PR shortly.