use-exit-intent icon indicating copy to clipboard operation
use-exit-intent copied to clipboard

Exit intent Fires on Input AutoComplete suggestions mouse hover

Open brzane opened this issue 2 years ago • 8 comments

I'm facing a problem with the exit intent hook that when the user clicks on an input and tries to select from the browser autoComplete suggestions it fires , i want it to fire only when he tries to move outside the page , it seems that it the hook treats the autoCompelete as outside the page

brzane avatar Feb 14 '23 16:02 brzane

Hi @brzane , could you please provide a reproducible example? Also, what browser are you testing?

daltonmenezes avatar Feb 14 '23 16:02 daltonmenezes

For me too, in Google Chrome. When the browser suggests autoComplete on the input

danielrmartins avatar Mar 07 '23 20:03 danielrmartins

@danielrmartins what's your operating system?

daltonmenezes avatar Mar 07 '23 20:03 daltonmenezes

Linux - Ubuntu

danielrmartins avatar Mar 07 '23 20:03 danielrmartins

On Windows, this issue doesn't occur 🎉

danielrmartins avatar Mar 07 '23 20:03 danielrmartins

@danielrmartins @brzane I believe this is an OS thing and how they deal with windows and elements like autofill popups and etc treating them like something outside the main window focus, so when the focus came back to the main window the hook fire!

Perhaps this is an unsolved case, the reason: #1

If anyone has a viable way to solve it so as not to break what was solved on #1, please, I'll be grateful if you send a PR. 💜

daltonmenezes avatar Mar 09 '23 00:03 daltonmenezes

Unfortunately, this problem occurs in Windows OS too

danielrmartins avatar Mar 20 '23 20:03 danielrmartins

@brzane @danielrmartins Here it is working as expected!

https://github.com/daltonmenezes/use-exit-intent/assets/1149845/0d771247-4661-4c27-b29a-36f43e6f1eb4

daltonmenezes avatar Aug 05 '23 02:08 daltonmenezes