Skip to content

Commit 83e45c8

Browse files
walerunnomcopter
authored andcommitted
prevent right mouse button click (#66)
1 parent 44e07ae commit 83e45c8

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/Split.tsx

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,10 @@ export class Split extends React.PureComponent<SplitProps> {
7272
}
7373

7474
private onMouseDown = (event: React.MouseEvent<HTMLElement>) => {
75+
if (event.button !== 0) {
76+
return;
77+
}
78+
7579
event.preventDefault();
7680
document.addEventListener('mousemove', this.onMouseMove, true);
7781
document.addEventListener('mouseup', this.onMouseUp, true);

0 commit comments

Comments
 (0)