Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Block jumps when creation is undone on develop #6001

Closed
alschmiedt opened this issue Mar 15, 2022 · 3 comments
Closed

Block jumps when creation is undone on develop #6001

alschmiedt opened this issue Mar 15, 2022 · 3 comments
Assignees

Comments

@alschmiedt
Copy link
Contributor

Describe the bug

To Reproduce

Steps to reproduce the behavior:

  1. Go to the playground
  2. Drag a block on to the workspace
  3. Control + Z
  4. Block jumps back to the top left of the screen before being deleted.

Expected behavior
Block should just disappear from its current location.

Screenshots

Additional context
The deleting noise is also played here, which surprisingly is not what it has done in the past. Also, I haven't had a chance to debug why/when this was introduced.

@BeksOmega
Copy link
Collaborator

I think this was caused by #5919

@BeksOmega
Copy link
Collaborator

BeksOmega commented Mar 23, 2022

It looks like the issue is that the Create event is getting undone, which triggers the animation to start, and then the Move event (caused by the drag) is getting undone, causing the block to "jump". Before this wasn't a problem because undoing the Create would just kill the block, so we wouldn't see the move event get undone. But since it animates now we see it.

I think the proper way to fix this is to make it so that the initial Move event has recordUndo set to false. But that would involve digging into the gesture code, which I do not want to do this close to the release. So I think the simplest thing is just to revert the animation. @NeilFraser thoughts? Would love to keep the animation in if possible.

@alschmiedt
Copy link
Contributor Author

Closing since this was fixed by #6031.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants