Skip to content

Commit

Permalink
fix: themesberg#1435 Avoid double taps on buttons with tooltip on saf…
Browse files Browse the repository at this point in the history
…ari iOS

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 20, 2024
1 parent 235523d commit 35927ae
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 @@ -123,8 +123,8 @@
['focusin', showHandler, true],
['focusout', hideHandler, true],
['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 35927ae

Please sign in to comment.