Skip to content

Commit

Permalink
initialize Edit>Undo/Redno once on editor start (#28332)
Browse files Browse the repository at this point in the history
  • Loading branch information
ycw committed May 10, 2024
1 parent a13bb05 commit 4ec57f5
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions editor/js/Menubar.Edit.js
Expand Up @@ -47,7 +47,7 @@ function MenubarEdit( editor ) {
} );
options.add( redo );

editor.signals.historyChanged.add( function () {
function onHistoryChanged() {

const history = editor.history;

Expand All @@ -66,7 +66,10 @@ function MenubarEdit( editor ) {

}

} );
}

editor.signals.historyChanged.add( onHistoryChanged );
onHistoryChanged();

// ---

Expand Down

0 comments on commit 4ec57f5

Please sign in to comment.