1
0
mirror of https://github.com/excalidraw/excalidraw.git synced 2024-11-10 11:35:52 +01:00

ensure mouse drag doesn't select texts (#32) (#111)

This commit is contained in:
David Luzar 2020-01-04 15:22:08 +01:00 committed by Christopher Chedeau
parent c623312380
commit e0deb68875

@ -984,9 +984,11 @@ class App extends React.Component<{}, AppState> {
}));
}}
onMouseDown={e => {
if (e.button !== 0) {
return;
}
// only handle left mouse button
if (e.button !== 0) return;
// fixes mousemove causing selection of UI texts #32
e.preventDefault();
const x =
e.clientX -
(e.target as HTMLElement).offsetLeft -