Skip to content

Commit 516151a

Browse files
committed
fix(selectionTool) artifacts
1 parent 148fd8f commit 516151a

File tree

1 file changed

+9
-7
lines changed

1 file changed

+9
-7
lines changed

src/js/client/keyboard.js

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1624,13 +1624,15 @@ const createSelectionTool = () => {
16241624
return;
16251625
}
16261626
State.textArtCanvas.startUndo();
1627-
// Always refetch current selection data
1628-
selectionData = State.textArtCanvas.getArea(
1629-
selection.x,
1630-
selection.y,
1631-
selection.width,
1632-
selection.height,
1633-
);
1627+
// Only update the current selection data if we don't have it
1628+
if (!selectionData) {
1629+
selectionData = State.textArtCanvas.getArea(
1630+
selection.x,
1631+
selection.y,
1632+
selection.width,
1633+
selection.height,
1634+
);
1635+
}
16341636
// Restore what was underneath the current position (if any)
16351637
if (underlyingData) {
16361638
State.textArtCanvas.setArea(underlyingData, selection.x, selection.y);

0 commit comments

Comments
 (0)