-
-
Notifications
You must be signed in to change notification settings - Fork 3.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix(web): clicking away closes context menu #16989
Conversation
7491d0d
to
1baf817
Compare
Is there a way to fix this and still avoid making a mouse up outside the modal dismiss the modal, as #15900 does? |
Looks like there is, thanks for the poke to make a better fix. Using the I'll do some more testing on mobile vs desktop to make sure it's looking ok. |
b35a2cd
to
0d2cf47
Compare
This reverts commit 0d2cf47.
Hey @mertalev, this PR maintains the mouseup fix from #15900. Rather than changing the
I've decided to revert the simpler fix of using the |
Deploying preview environment to https://pr-16989.preview.internal.immich.cloud/ |
Description
Fixes #16147
Using "click" event handler to detect whether there's been a click outside of the context menu, rather than the "mousedown" event in the use:clickOutside Svelte action.
The cause?
This bug was likely introduced in #15900, where the clickOutside listener changed was changed from "click" to "mousedown".
The asset viewer page uses the
@zoom-image/svelte
library to handle zooming, which listens for "pointerdown" events and uses event.preventDefault to override default behavior. According to the MDN docs for PointerEvent, this stops the mouse events from firing and therefore breaks the clicking outside behavior in Immich.How Has This Been Tested?
Checklist: