Skip to content

Commit

Permalink
fix: Pause history tracking while moving a block
Browse files Browse the repository at this point in the history
  • Loading branch information
surajshetty3416 committed Dec 16, 2024
1 parent 62b8be7 commit 81e734e
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions frontend/src/components/BlockEditor.vue
Original file line number Diff line number Diff line change
Expand Up @@ -240,6 +240,7 @@ const handleDoubleClick = (ev: MouseEvent) => {
};
const handleMove = (ev: MouseEvent) => {
const pauseId = store.activeCanvas?.history?.pause();
if (store.mode === "text") {
store.editableBlock = props.block;
}
Expand Down Expand Up @@ -288,6 +289,7 @@ const handleMove = (ev: MouseEvent) => {
document.removeEventListener("mousemove", mousemove);
mouseUpEvent.preventDefault();
guides.hideX();
store.activeCanvas?.history?.resume(pauseId);
},
{ once: true },
);
Expand Down

0 comments on commit 81e734e

Please sign in to comment.