Skip to content

Commit 0a5904a

Browse files
fix
1 parent 3f5f69f commit 0a5904a

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

src/components/Board/Board.tsx

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -941,8 +941,8 @@ const Board = React.forwardRef<BoardActions, BoardProps>(
941941
"mouse:down",
942942
function (this: fabricTypes.CanvasAnnotationState, opt) {
943943
const evt = opt.e;
944-
if (evt.button === 1) {
945-
// Right mouse button
944+
945+
if ((evt.button === 0 && !opt.target) || evt.button === 1) {
946946
this.isDragging = true;
947947
this.selection = false;
948948
this.lastPosX = evt.clientX;
@@ -1029,8 +1029,7 @@ const Board = React.forwardRef<BoardActions, BoardProps>(
10291029
"mouse:up",
10301030
function (this: fabricTypes.CanvasAnnotationState, opt) {
10311031
const evt = opt.e as MouseEvent;
1032-
if (evt.button === 1) {
1033-
// Right mouse button
1032+
if ([0, 1].includes(evt.button)) {
10341033
this.isDragging = false;
10351034
this.selection = true;
10361035
editor.canvas.zoomToPoint(

0 commit comments

Comments
 (0)