Skip to content

Commit

Permalink
fix: #1435 Avoid double taps on buttons with tooltip on safari iOS
Browse files Browse the repository at this point in the history
Due to an Safari Issue the first "mouseenter" event will block
the "click" event. This can be worked around by using the
"pointerenter" instead.
  • Loading branch information
mrh1997 committed Sep 22, 2024
1 parent 099cfa6 commit f69367d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/lib/utils/Popper.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -128,8 +128,8 @@
['focusin', showHandler, focusable],
['focusout', hideHandler, focusable],
['click', showHandler, clickable],
['mouseenter', showHandler, hoverable],
['mouseleave', hideHandler, hoverable]
['pointerenter', showHandler, hoverable],
['pointerleave', hideHandler, hoverable]
];
if (triggeredBy) triggerEls = [...document.querySelectorAll<HTMLElement>(triggeredBy)];
Expand Down

0 comments on commit f69367d

Please sign in to comment.