diff --git a/services/web/frontend/js/features/ide-redesign/hooks/use-toolbar-menu-editor-commands.tsx b/services/web/frontend/js/features/ide-redesign/hooks/use-toolbar-menu-editor-commands.tsx index 7f23b4f51c..ba96d049f8 100644 --- a/services/web/frontend/js/features/ide-redesign/hooks/use-toolbar-menu-editor-commands.tsx +++ b/services/web/frontend/js/features/ide-redesign/hooks/use-toolbar-menu-editor-commands.tsx @@ -177,6 +177,7 @@ export const useToolbarMenuBarEditorCommands = () => { handler: () => { commands.addComment() }, + disabled: state.selection.main.empty, }, /************************************ * Format menu @@ -286,6 +287,7 @@ export const useToolbarMenuBarEditorCommands = () => { newEditor, trackedWrite, isTeXFile, + state.selection.main.empty, ]) const { toggleSymbolPalette } = useEditorPropertiesContext()