tristen / hoverintent

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

Clicking and clicking-and-holding should be interpreted as no intention to hover #34

Open estaylorco opened 3 years ago

estaylorco commented 3 years ago

Hello,

When a user clicks or clicks-and-holds on a hoverintent element, that should be interpreted as no intention to hover. In the vernacular of your [fantastic] library, the interval should be reset upon any type of clicking.

I would argue that any type of clicking signifies that the user does not intend to hover. Do you agree?

The problem I'm encountering is that, on an element where click is trapped, sometimes an overlay I created appears when it shouldn't. What's happening is that the user is clicking on the element (or clicking-and-holding) after a hover is initiated but before the interval has elapsed (and the "in" function is called).