From 76f36e2fd32f3352d9267ac7320e361519e78d99 Mon Sep 17 00:00:00 2001 From: Elian Doran Date: Mon, 2 Feb 2026 18:39:40 +0200 Subject: [PATCH] fix(mobile/custom_note_actions): unable to close empty pane --- .../mobile_widgets/mobile_detail_menu.tsx | 25 ++++++++++++------- 1 file changed, 16 insertions(+), 9 deletions(-) diff --git a/apps/client/src/widgets/mobile_widgets/mobile_detail_menu.tsx b/apps/client/src/widgets/mobile_widgets/mobile_detail_menu.tsx index ed69af6f2..417f69e89 100644 --- a/apps/client/src/widgets/mobile_widgets/mobile_detail_menu.tsx +++ b/apps/client/src/widgets/mobile_widgets/mobile_detail_menu.tsx @@ -1,7 +1,6 @@ import { t } from "../../services/i18n"; -import { getHelpUrlForNote } from "../../services/in_app_help"; import note_create from "../../services/note_create"; -import { openInAppHelpFromUrl } from "../../services/utils"; +import ActionButton from "../react/ActionButton"; import { FormDropdownDivider, FormListItem } from "../react/FormList"; import { useNoteContext } from "../react/hooks"; import { NoteContextMenu } from "../ribbon/NoteActions"; @@ -12,9 +11,16 @@ export default function MobileDetailMenu() { const subContexts = noteContext?.getMainContext().getSubContexts() ?? []; const isMainContext = noteContext?.isMainContext(); + function closePane() { + // Wait first for the context menu to be dismissed, otherwise the backdrop stays on. + requestAnimationFrame(() => { + parentComponent.triggerCommand("closeThisNoteSplit", { ntxId }); + }); + } + return (
- {note && ( + {note ? ( @@ -34,17 +40,18 @@ export default function MobileDetailMenu() { { - // Wait first for the context menu to be dismissed, otherwise the backdrop stays on. - requestAnimationFrame(() => { - parentComponent.triggerCommand("closeThisNoteSplit", { ntxId }); - }); - }} + onClick={closePane} >{t("close_pane_button.close_this_pane")} } } /> + ) : ( + )}
);