From c994951a7164e86909117745162dfec286ee31ab Mon Sep 17 00:00:00 2001 From: mvdbeek Date: Wed, 8 May 2024 19:33:42 +0200 Subject: [PATCH] Fix activity bar touch events on iphone I'm not sure what the issue is here, the minimal fix is this: ``` diff --git a/client/src/components/Popper/usePopper.ts b/client/src/components/Popper/usePopper.ts index ad18847d8d..183d2e49be 100644 --- a/client/src/components/Popper/usePopper.ts +++ b/client/src/components/Popper/usePopper.ts @@ -190,7 +190,7 @@ export function usePopperjs( on(referenceRef.value!, "mouseout", doMouseout); on(popperRef.value!, "mouseout", doMouseout); on(referenceRef.value!, "mousedown", doMouseout); - on(popperRef.value!, "mousedown", doMouseout); + // on(popperRef.value!, "mousedown", doMouseout); break; } ``` but I think we can probably just rely on events happening on referenceRef. --- client/src/components/Popper/usePopper.ts | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/client/src/components/Popper/usePopper.ts b/client/src/components/Popper/usePopper.ts index ad18847d8daa..8a2155e6a62e 100644 --- a/client/src/components/Popper/usePopper.ts +++ b/client/src/components/Popper/usePopper.ts @@ -186,19 +186,14 @@ export function usePopperjs( case "hover": { on(referenceRef.value!, "mouseover", doMouseover); - on(popperRef.value!, "mouseover", doMouseover); on(referenceRef.value!, "mouseout", doMouseout); - on(popperRef.value!, "mouseout", doMouseout); on(referenceRef.value!, "mousedown", doMouseout); - on(popperRef.value!, "mousedown", doMouseout); break; } case "focus": { on(referenceRef.value!, "focus", doOpen); - on(popperRef.value!, "focus", doOpen); on(referenceRef.value!, "blur", doClose); - on(popperRef.value!, "blur", doClose); break; } @@ -218,16 +213,11 @@ export function usePopperjs( off(referenceRef.value!, "click", doToggle); off(referenceRef.value!, "mouseover", doMouseover); - off(popperRef.value!, "mouseover", doMouseover); off(referenceRef.value!, "mouseout", doMouseout); - off(popperRef.value!, "mouseout", doMouseout); off(referenceRef.value!, "mousedown", doMouseout); - off(popperRef.value!, "mousedown", doMouseout); off(referenceRef.value!, "focus", doOpen); - off(popperRef.value!, "focus", doOpen); off(referenceRef.value!, "blur", doClose); - off(popperRef.value!, "blur", doClose); }; const doCloseForDocument = (e: Event) => { if (referenceRef.value?.contains(e.target as Element)) {