1
0
mirror of https://github.com/excalidraw/excalidraw.git synced 2025-02-18 13:29:36 +01:00

persist pointerDown event (#1426)

This commit is contained in:
David Luzar 2020-04-14 12:33:57 +02:00 committed by GitHub
parent fcf2a73ffb
commit d998a190df
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -1577,6 +1577,8 @@ class App extends React.Component<any, AppState> {
private handleCanvasPointerDown = (
event: React.PointerEvent<HTMLCanvasElement>,
) => {
event.persist();
if (lastPointerUp !== null) {
// Unfortunately, sometimes we don't get a pointerup after a pointerdown,
// this can happen when a contextual menu or alert is triggered. In order to avoid