Skip to content

Commit

Permalink
fix: disable context menu on editing
Browse files Browse the repository at this point in the history
  • Loading branch information
sprocketc authored and tiensonqin committed Dec 28, 2022
1 parent 080b5ab commit bdd1dbb
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Expand Up @@ -43,7 +43,7 @@ export const ContextMenu = observer(function ContextMenu({
}
}}
>
<ReactContextMenu.Trigger>{children}</ReactContextMenu.Trigger>
<ReactContextMenu.Trigger disabled={app.editingShape}>{children}</ReactContextMenu.Trigger>
<ReactContextMenu.Content
className="tl-menu tl-context-menu"
ref={rContent}
Expand Down
2 changes: 1 addition & 1 deletion tldraw/packages/core/src/lib/TLApp/TLApp.ts
Expand Up @@ -1034,7 +1034,7 @@ export class TLApp<
}

// Switch to select on right click to enable contextMenu state
if (e.button === 2) {
if (e.button === 2 && !this.editingShape) {
this.transition('select')
return
}
Expand Down

0 comments on commit bdd1dbb

Please sign in to comment.