From becf4afe85ed3b9ab89d7642edd36e794dc679ac Mon Sep 17 00:00:00 2001 From: Maksim Eltyshev Date: Sat, 25 Feb 2023 15:09:46 +0100 Subject: [PATCH] fix: Prevent board from scrolling when it starts with non-left-click --- client/src/components/Board/Board.jsx | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/client/src/components/Board/Board.jsx b/client/src/components/Board/Board.jsx index d3bb09cc..481eaedf 100755 --- a/client/src/components/Board/Board.jsx +++ b/client/src/components/Board/Board.jsx @@ -62,6 +62,11 @@ const Board = React.memo( const handleMouseDown = useCallback( (event) => { + // If button is defined and not equal to 0 (left click) + if (event.button) { + return; + } + if (event.target !== wrapper.current && !event.target.dataset.dragScroller) { return; }