Skip to content

Commit 3de2a32

Browse files
committed
fix: context menu not showing anywhere after right click cancel
1 parent 7aa0a01 commit 3de2a32

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

src/RightClickCancelSensor.tsx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,7 @@ import { PointerSensor, PointerSensorProps } from '@dnd-kit/core';
77
* Works by listening to the "contextmenu" event on window.
88
*/
99
export class RightClickCancelSensor extends PointerSensor {
10-
private handleContextMenu = (event: MouseEvent) => {
11-
event.preventDefault();
10+
private handleContextMenu = () => {
1211
// @ts-expect-error: Accessing private props to call onCancel
1312
if (this.props && typeof this.props.onCancel === 'function') {
1413
// @ts-expect-error: Accessing private props to call onCancel

0 commit comments

Comments
 (0)