Skip to content

Commit 406f399

Browse files
committed
fix duplicate codemirror undo/reo
1 parent e065e20 commit 406f399

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src/ide/views/asseteditor.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -479,8 +479,8 @@ export class AssetEditorView implements ProjectView, pixed.EditorContext {
479479
projectWindows.undofiles = [];
480480
projectWindows.redofiles = [];
481481
if (Mousetrap.bind) {
482-
Mousetrap.bind('mod+z', projectWindows.undoStep.bind(projectWindows));
483-
Mousetrap.bind('mod+shift+z', projectWindows.redoStep.bind(projectWindows));
482+
Mousetrap.bind('mod+z', (e) => { projectWindows.undoStep(); return false; });
483+
Mousetrap.bind('mod+shift+z', (e) => { projectWindows.redoStep(); return false; });
484484
}
485485
} else {
486486
if (Mousetrap.unbind) {

0 commit comments

Comments
 (0)