From 9d5cfbbfb73c9abcf9ae534eb61548a9aa6fe225 Mon Sep 17 00:00:00 2001 From: zsviczian Date: Sat, 22 Apr 2023 14:17:13 +0200 Subject: [PATCH] fix: text jumps when editing on Android Chrome (#6503) * debug logging * debug * debugging * Update textWysiwyg.tsx * Update textWysiwyg.tsx * extended debug information * debug * debug * trace * further debug * don't drag while editing * removing all console.logs * revert all changes to textWysiwyt.tsx * updated comment --- src/components/App.tsx | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/components/App.tsx b/src/components/App.tsx index 8000ea56..54626143 100644 --- a/src/components/App.tsx +++ b/src/components/App.tsx @@ -4721,7 +4721,12 @@ class App extends React.Component { pointerDownState.drag.hasOccurred = true; // prevent dragging even if we're no longer holding cmd/ctrl otherwise // it would have weird results (stuff jumping all over the screen) - if (selectedElements.length > 0 && !pointerDownState.withCmdOrCtrl) { + // Checking for editingElement to avoid jump while editing on mobile #6503 + if ( + selectedElements.length > 0 && + !pointerDownState.withCmdOrCtrl && + !this.state.editingElement + ) { const [dragX, dragY] = getGridPoint( pointerCoords.x - pointerDownState.drag.offset.x, pointerCoords.y - pointerDownState.drag.offset.y,