1
0
mirror of https://github.com/laurent22/joplin.git synced 2025-07-13 00:10:37 +02:00

Desktop: Fixes #5707: Add back text editor commands to Command Palette

This commit is contained in:
Laurent Cozic
2021-12-31 09:20:29 +01:00
parent e5b6ecc50b
commit 3cf0841775
3 changed files with 15 additions and 1 deletions

View File

@ -56,7 +56,15 @@ function editorCommandRuntime(declaration: CommandDeclaration, editorRef: any, s
});
}
},
enabledCondition: '!modalDialogVisible && markdownEditorPaneVisible && oneNoteSelected && noteIsMarkdown',
// We disable the editor commands whenever a modal dialog is visible,
// otherwise the user might type something in a dialog and accidentally
// change something in the editor. However, we still enable them for
// GotoAnything so that it's possible to type eg `textBold` and bold the
// currently selected text.
//
// https://github.com/laurent22/joplin/issues/5707
enabledCondition: '(!modalDialogVisible || gotoAnythingVisible) && markdownEditorPaneVisible && oneNoteSelected && noteIsMarkdown',
};
}