Просмотр исходного кода

fix: Apple Pen missing strokes (#4705)

David Luzar 3 лет назад
Родитель
Сommit
08115ef311
1 измененных файлов с 4 добавлено и 1 удалено
  1. 4 1
      src/components/App.tsx

+ 4 - 1
src/components/App.tsx

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