Disable Insert > Comment menu item when no text is selected (#26805)

GitOrigin-RevId: a5fdd662cd487359f9b09212a449d7831bb5dcac
This commit is contained in:
Alf Eaton
2025-07-09 13:48:24 +01:00
committed by Copybot
parent b87b83e33c
commit b410de7c39
@@ -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()