We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 77c695a commit f31a9f9Copy full SHA for f31a9f9
1 file changed
core/contextmenu_items.ts
@@ -611,7 +611,9 @@ export function registerCommentDuplicate() {
611
export function registerCommentCreate() {
612
const createOption: RegistryItem = {
613
displayText: () => Msg['ADD_COMMENT'],
614
- preconditionFn: () => 'enabled',
+ preconditionFn: (scope: Scope) => {
615
+ return scope.workspace?.isMutator ? 'hidden' : 'enabled';
616
+ },
617
callback: (scope: Scope, e: PointerEvent) => {
618
const workspace = scope.workspace;
619
if (!workspace) return;
0 commit comments