You've already forked joplin
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:
@ -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,
|
||||||
|
@ -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',
|
||||||
|
@ -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',
|
||||||
|
Reference in New Issue
Block a user