fix: Apple Pen missing strokes (#4705)

This commit is contained in:
David Luzar 2022-02-06 20:07:37 +01:00 committed by GitHub
parent e68abdbab4
commit 08115ef311
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1273,6 +1273,9 @@ class App extends React.Component<AppProps, AppState> {
} }
private onTapStart = (event: TouchEvent) => { private onTapStart = (event: TouchEvent) => {
// fix for Apple Pencil Scribble
event.preventDefault();
if (!didTapTwice) { if (!didTapTwice) {
didTapTwice = true; didTapTwice = true;
clearTimeout(tappedTwiceTimer); clearTimeout(tappedTwiceTimer);
@ -1294,7 +1297,7 @@ class App extends React.Component<AppProps, AppState> {
didTapTwice = false; didTapTwice = false;
clearTimeout(tappedTwiceTimer); clearTimeout(tappedTwiceTimer);
} }
event.preventDefault();
if (event.touches.length === 2) { if (event.touches.length === 2) {
this.setState({ this.setState({
selectedElementIds: {}, selectedElementIds: {},