From 7946d986a771262ac9fb4b23d04ab6db3d65adf9 Mon Sep 17 00:00:00 2001 From: Claire Date: Thu, 1 Aug 2024 22:50:36 +0200 Subject: [PATCH] [Glitch] Fix click event handling when clicking outside of an open dropdown menu Port afdfeb585640af53cf7e9c63d82aa56ca8bae1e4 to glitch-soc Signed-off-by: Claire --- app/javascript/flavours/glitch/components/dropdown_menu.jsx | 1 + 1 file changed, 1 insertion(+) diff --git a/app/javascript/flavours/glitch/components/dropdown_menu.jsx b/app/javascript/flavours/glitch/components/dropdown_menu.jsx index 26c828fd64..204d6fb0fb 100644 --- a/app/javascript/flavours/glitch/components/dropdown_menu.jsx +++ b/app/javascript/flavours/glitch/components/dropdown_menu.jsx @@ -39,6 +39,7 @@ class DropdownMenu extends PureComponent { if (this.node && !this.node.contains(e.target)) { this.props.onClose(); e.stopPropagation(); + e.preventDefault(); } };