mirror of
https://github.com/excalidraw/excalidraw.git
synced 2025-05-03 10:00:07 -04:00
ensure mouse drag doesn't select texts (#32)
This commit is contained in:
parent
2d0934fdd9
commit
2e44fe2789
1 changed files with 5 additions and 3 deletions
|
@ -963,9 +963,11 @@ class App extends React.Component<{}, AppState> {
|
||||||
}));
|
}));
|
||||||
}}
|
}}
|
||||||
onMouseDown={e => {
|
onMouseDown={e => {
|
||||||
if (e.button !== 0) {
|
// only handle left mouse button
|
||||||
return;
|
if (e.button !== 0) return;
|
||||||
}
|
// fixes mousemove causing selection of UI texts #32
|
||||||
|
e.preventDefault();
|
||||||
|
|
||||||
const x =
|
const x =
|
||||||
e.clientX -
|
e.clientX -
|
||||||
(e.target as HTMLElement).offsetLeft -
|
(e.target as HTMLElement).offsetLeft -
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue