Skip to content

Commit

Permalink
Restore context menu when no selection in progress
Browse files Browse the repository at this point in the history
  • Loading branch information
axelboc committed Aug 11, 2023
1 parent d912a67 commit 5da1e6a
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions packages/lib/src/interactions/SelectionTool.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -146,8 +146,10 @@ function SelectionTool(props: Props) {

useKeyboardEvent('Escape', cancelSelection, [], { event: 'keydown' });
useEventListener(window, 'contextmenu', (evt: MouseEvent) => {
evt.preventDefault();
cancelSelection();
if (startEvtRef.current) {
evt.preventDefault();
cancelSelection();
}
});

// Compute effective selection
Expand Down

0 comments on commit 5da1e6a

Please sign in to comment.