diff --git a/packages/editor/src/extensions/attachment/component.tsx b/packages/editor/src/extensions/attachment/component.tsx index bbf602590..75c28189f 100644 --- a/packages/editor/src/extensions/attachment/component.tsx +++ b/packages/editor/src/extensions/attachment/component.tsx @@ -87,7 +87,11 @@ export function AttachmentComponent( {selected && ( [...STATIC_TOOLBAR_GROUPS, ...tools], - [tools] - ); - const isMobile = useIsMobile(); + const toolbarTools = useMemo( + () => + isMobile + ? [...STATIC_TOOLBAR_GROUPS, ...MOBILE_ONLY_TOOLS, ...tools] + : [...STATIC_TOOLBAR_GROUPS, ...tools], + [tools, isMobile] + ); const setToolbarLocation = useToolbarStore( (store) => store.setToolbarLocation