[fix] Screen bounds offset after editing text (#1976)

This PR fixes an issue where the screen bounds could be wrong after
editing text on iOS / mobile.

### Change Type

- [x] `patch` — Bug fix

### Test Plan

1. On iOS, create a text shape at the bottom of the screen.
2. Edit the text shape.
3. Stop editing.
4. Drag a selection box to confirm that the page bounds is still
correct.
This commit is contained in:
Steve Ruiz 2023-09-30 22:39:09 +01:00 committed by GitHub
parent b149fe7e98
commit 0d21e8aad2
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -31,6 +31,10 @@ export class EditingShape extends StateNode {
// Check for changes on editing end
util.onEditEnd?.(shape)
setTimeout(() => {
this.editor.updateViewportScreenBounds()
}, 500)
}
override onPointerMove: TLEventHandlers['onPointerMove'] = (info) => {