From b81c28e7dcc6a306e412bbc5beac364ff74531e0 Mon Sep 17 00:00:00 2001 From: Claire Date: Tue, 29 Apr 2025 11:48:54 +0200 Subject: [PATCH] Fix edit dropdown crashing the web interface on mobile (#34564) --- app/javascript/mastodon/components/dropdown_menu.tsx | 5 ++++- .../mastodon/components/edited_timestamp/index.tsx | 1 + 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/app/javascript/mastodon/components/dropdown_menu.tsx b/app/javascript/mastodon/components/dropdown_menu.tsx index c2fb93940c..23d77f0dda 100644 --- a/app/javascript/mastodon/components/dropdown_menu.tsx +++ b/app/javascript/mastodon/components/dropdown_menu.tsx @@ -297,6 +297,7 @@ interface DropdownProps { scrollable?: boolean; scrollKey?: string; status?: ImmutableMap; + forceDropdown?: boolean; renderItem?: RenderItemFn; renderHeader?: RenderHeaderFn; onOpen?: () => void; @@ -316,6 +317,7 @@ export const Dropdown = ({ disabled, scrollable, status, + forceDropdown = false, renderItem, renderHeader, onOpen, @@ -386,7 +388,7 @@ export const Dropdown = ({ dispatch(fetchRelationships([prefetchAccountId])); } - if (isUserTouching()) { + if (isUserTouching() && !forceDropdown) { dispatch( openModal({ modalType: 'ACTIONS', @@ -416,6 +418,7 @@ export const Dropdown = ({ handleItemClick, open, items, + forceDropdown, handleClose, ], ); diff --git a/app/javascript/mastodon/components/edited_timestamp/index.tsx b/app/javascript/mastodon/components/edited_timestamp/index.tsx index 4a33210199..63b21cf5bd 100644 --- a/app/javascript/mastodon/components/edited_timestamp/index.tsx +++ b/app/javascript/mastodon/components/edited_timestamp/index.tsx @@ -116,6 +116,7 @@ export const EditedTimestamp: React.FC<{ renderHeader={renderHeader} onOpen={handleOpen} onItemClick={handleItemClick} + forceDropdown >