diff --git a/services/web/frontend/js/features/source-editor/components/codemirror-toolbar.tsx b/services/web/frontend/js/features/source-editor/components/codemirror-toolbar.tsx index 3203687d07..b6090141f2 100644 --- a/services/web/frontend/js/features/source-editor/components/codemirror-toolbar.tsx +++ b/services/web/frontend/js/features/source-editor/components/codemirror-toolbar.tsx @@ -46,6 +46,7 @@ const Toolbar = memo(function Toolbar() { const overflowedItemsRef = useRef>(new Set()) const languageName = state.facet(language)?.name + const visual = isVisual(view) const { open: overflowOpen, @@ -100,7 +101,7 @@ const Toolbar = memo(function Toolbar() { return (
{showSourceToolbar && } - +
@@ -128,7 +130,7 @@ const Toolbar = memo(function Toolbar() { active={searchPanelOpen(state)} icon="search" /> - {languageName === 'latex' && !isVisual(view) && ( + {languageName === 'latex' && !visual && ( languageName?: string -}> = memo(function ToolbarItems({ state, overflowed, languageName }) { + visual: boolean +}> = memo(function ToolbarItems({ state, overflowed, languageName, visual }) { const { t } = useTranslation() const { toggleSymbolPalette, showSymbolPalette } = useEditorContext() const isActive = withinFormattingCommand(state) @@ -192,7 +193,7 @@ export const ToolbarItems: FC<{ label={t('toolbar_decrease_indent')} command={commands.indentDecrease} icon="outdent" - shortcut={isMac ? '⌘[' : 'Ctrl+['} + shortcut={visual ? (isMac ? '⌘[' : 'Ctrl+[') : undefined} disabled={listDepth < 2} />