From 9fe7bdf79bb786b27f3140138a356c8bd03c0c2f Mon Sep 17 00:00:00 2001 From: Elian Doran Date: Thu, 19 Feb 2026 18:35:32 +0200 Subject: [PATCH] fix(mobile/global_menu): tooltips not visible due to position --- .../widgets/launch_bar/launch_bar_widgets.tsx | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/apps/client/src/widgets/launch_bar/launch_bar_widgets.tsx b/apps/client/src/widgets/launch_bar/launch_bar_widgets.tsx index 639b5aede7..288565cf7b 100644 --- a/apps/client/src/widgets/launch_bar/launch_bar_widgets.tsx +++ b/apps/client/src/widgets/launch_bar/launch_bar_widgets.tsx @@ -3,11 +3,14 @@ import { createContext } from "preact"; import { useContext } from "preact/hooks"; import FNote from "../../entities/fnote"; +import utils from "../../services/utils"; import ActionButton, { ActionButtonProps } from "../react/ActionButton"; import Dropdown, { DropdownProps } from "../react/Dropdown"; import { useNoteLabel, useNoteProperty } from "../react/hooks"; import Icon from "../react/Icon"; +const cachedIsMobile = utils.isMobile(); + export const LaunchBarContext = createContext<{ isHorizontalLayout: boolean; }>({ @@ -26,7 +29,7 @@ export function LaunchBarActionButton({ className, ...props }: Omit ); @@ -34,6 +37,7 @@ export function LaunchBarActionButton({ className, ...props }: Omit & { icon: string }) { const { isHorizontalLayout } = useContext(LaunchBarContext); + const titlePosition = getTitlePosition(isHorizontalLayout); return ( } - titlePosition={isHorizontalLayout ? "bottom" : "right"} + titlePosition={titlePosition} titleOptions={{ animation: false }} dropdownOptions={{ ...dropdownOptions, popperConfig: { - placement: isHorizontalLayout ? "bottom" : "right" + placement: titlePosition } }} mobileBackdrop @@ -67,3 +71,10 @@ export function useLauncherIconAndTitle(note: FNote) { title: title ?? "" }; } + +function getTitlePosition(isHorizontalLayout: boolean) { + if (cachedIsMobile) { + return "top"; + } + return isHorizontalLayout ? "bottom" : "right"; +}