Unverified Commit 654a8a81 authored by Jyothish's avatar Jyothish Committed by GitHub
Browse files

fix chrome warning on making events passive (#576)

parent 2b1b6fc1
Pipeline #191466 passed with stages
in 6 minutes and 42 seconds
......@@ -44,7 +44,7 @@ export default function useHover<T extends HTMLElement>(): UseHoverType<T> {
element.addEventListener('mouseenter', handleMouseEnter);
element.addEventListener('mouseleave', handleMouseLeave);
element.addEventListener('click', handleMouseLeave);
element.addEventListener('touchstart', handleTouch);
element.addEventListener('touchstart', handleTouch, { passive: true });
// cancel hover state if user switches to a different tab
document.addEventListener('visibilitychange', handleMouseLeave);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment