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
This commit is contained in:
zsviczian 2023-04-22 14:17:13 +02:00 committed by GitHub
parent fee760d38c
commit 9d5cfbbfb7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -4721,7 +4721,12 @@ class App extends React.Component<AppProps, AppState> {
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,