-
Notifications
You must be signed in to change notification settings - Fork 3.8k
Description
Check for duplicates
- I have searched for similar issues before opening a new one.
Description
When you delete the selected block and there is no containing parent block for the focus manager to select (ie the block is top-level), the manager defaults to focusing whatever block is in the top-left of the workspace which scrolls the workspace to top left.
This behavior is very annoying for large workspaces because it means constantly having to re-scroll to wherever you are in your project whenever you delete something. For example, if you want to delete three blocks that are top level in the bottom right of your workspace, you're going to have to scroll all the way from the top left to the bottom right three times.
The expected behavior imo would be to focus whatever node is closest to the block's original location before being dragged/deleted.
Reproduction steps
- Open the Blockly playground
- Place a block in the top-left of the workspace and scroll to the right so that the block is no longer visible
- Place a few other blocks on the workspace
- Delete one of these blocks
- Watch as the workspace is scrolled away from where you were working
See screenshots below for a recording of me reproducing this issue
Priority
This is primarily an issue for our MakeCode Arcade editor, where large blocks projects are very common. I expect this will affect most of our users, so we consider this a high priority issue.
I haven't worked in the focus manager code before, so I can't speak to the effort involved but the solution at least seems clear.
Stack trace
Screenshots
Browsers
No response
