Skip to content

fix: Fix bug that could cause focus to be lost when deleting a block#9779

Open
gonfunko wants to merge 1 commit intov13from
delete-focus
Open

fix: Fix bug that could cause focus to be lost when deleting a block#9779
gonfunko wants to merge 1 commit intov13from
delete-focus

Conversation

@gonfunko
Copy link
Copy Markdown
Contributor

@gonfunko gonfunko commented Apr 29, 2026

The basics

The details

Resolves

This PR fixes a bug that could cause focus to be lost when deleting a block. Blocks attempt to focus a neighbor upon deletion, but because the neighbor was being found mid-dispose, blocks had not yet marked their children as disposing, so in some cases a child block was found as the new focus position, which caused focus to be lost. Moving this to after super.dispose() fixes the issue by ensuring that the block and its children are all marked as disposing.

@gonfunko gonfunko requested a review from a team as a code owner April 29, 2026 22:12
@gonfunko gonfunko requested a review from mikeharv April 29, 2026 22:12
@github-actions github-actions Bot added PR: fix Fixes a bug and removed PR: fix Fixes a bug labels Apr 29, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

PR: fix Fixes a bug

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants