From afdfeb585640af53cf7e9c63d82aa56ca8bae1e4 Mon Sep 17 00:00:00 2001 From: Claire Date: Thu, 1 Aug 2024 22:50:36 +0200 Subject: [PATCH] Fix click event handling when clicking outside of an open dropdown menu (#31251) --- app/javascript/mastodon/components/dropdown_menu.jsx | 1 + 1 file changed, 1 insertion(+) diff --git a/app/javascript/mastodon/components/dropdown_menu.jsx b/app/javascript/mastodon/components/dropdown_menu.jsx index 524dbb927b426a..49951cfb5faeb4 100644 --- a/app/javascript/mastodon/components/dropdown_menu.jsx +++ b/app/javascript/mastodon/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(); } };