[Bug]: Expected an editing shape!
What happened?
I have a Custom shape in Page 1 and user is editing the shape, Suddenly he switches the page and add the same shape (using createShape) and when he clicks the shape this particular issue is getting raised.
How can we reproduce the bug?
Custom shape in Page 1 and user is editing the shape, Suddenly he switches the page and add the same shape (using createShape) and when he clicks the shape this particular issue is getting raised.
What browsers are you seeing the problem on?
Firefox, Chrome, Microsoft Edge
Contact Details
Code of Conduct
- [X] I agree to follow this project's Code of Conduct
Suddenly he switches the page
Is this happening programatically? i.e. are you are calling setCurrentPage somehow while the user is editing a shape?
I was able to reproduce this error that way, but I can't reproduce if I switch the page by clicking in the UI because it cancels the select.editing_shape interaction, which is the interaction that causes this bug.
I think it might make sense for us to call onComplete. I added a PR that might fix this here: https://github.com/tldraw/tldraw/pull/3771
@ds300 Yes you are right. I have used setCurrentPage to switch page. Thanks for the clarification.