1
0
mirror of https://github.com/laurent22/joplin.git synced 2025-07-16 00:14:34 +02:00

Desktop: Fixes #6214: Undo and redo on note title did not work in some cases

This commit is contained in:
Laurent Cozic
2022-03-03 13:53:11 +00:00
parent 32de63fad3
commit 94dc216add
3 changed files with 18 additions and 6 deletions

View File

@ -572,8 +572,15 @@ function useMenu(props: Props) {
menuItemDic.textPaste, menuItemDic.textPaste,
menuItemDic.textSelectAll, menuItemDic.textSelectAll,
separator(), separator(),
menuItemDic['editor.undo'], // Using the generic "undo"/"redo" roles mean the menu
menuItemDic['editor.redo'], // item will work in every text fields, whether it's the
// editor or a regular text field.
{
role: 'undo',
},
{
role: 'redo',
},
separator(), separator(),
menuItemDic.textBold, menuItemDic.textBold,
menuItemDic.textItalic, menuItemDic.textItalic,

View File

@ -93,11 +93,11 @@ const declarations: CommandDeclaration[] = [
}, },
{ {
name: 'editor.undo', name: 'editor.undo',
label: () => _('Undo'), label: () => _('Editor: %s', _('Undo')),
}, },
{ {
name: 'editor.redo', name: 'editor.redo',
label: () => _('Redo'), label: () => _('Editor: %s', _('Redo')),
}, },
{ {
name: 'editor.indentLess', name: 'editor.indentLess',

View File

@ -40,8 +40,13 @@ export default function() {
'toggleVisiblePanes', 'toggleVisiblePanes',
'editor.deleteLine', 'editor.deleteLine',
'editor.duplicateLine', 'editor.duplicateLine',
'editor.undo', // We cannot put the undo/redo commands in the menu because they are
'editor.redo', // editor-specific commands. If we put them there it will break the
// undo/redo in regular text fields.
// https://github.com/laurent22/joplin/issues/6214
// 'editor.undo',
// 'editor.redo',
'editor.indentLess', 'editor.indentLess',
'editor.indentMore', 'editor.indentMore',
'editor.toggleComment', 'editor.toggleComment',