Skip to content

Commit

Permalink
Fix activity bar touch events on iphone
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
mvdbeek committed May 9, 2024
1 parent b9808b3 commit c994951
Showing 1 changed file with 0 additions and 10 deletions.
10 changes: 0 additions & 10 deletions client/src/components/Popper/usePopper.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand All @@ -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)) {
Expand Down

0 comments on commit c994951

Please sign in to comment.