Focus new item if pane was focused when removing previous active item
Previously, we were relying on the item getting blurred and the workspace receiving focus, which would in turn focus the active pane. This doesn't play well with docks because they aren't part of the workspace panes.
This commit is contained in:
parent
641f5d1107
commit
37d3ed5f5f
1 changed files with 2 additions and 1 deletions
|
@ -903,7 +903,8 @@ impl Pane {
|
|||
// to activating the item to the left
|
||||
.unwrap_or_else(|| item_index.min(self.items.len()).saturating_sub(1));
|
||||
|
||||
self.activate_item(index_to_activate, activate_pane, activate_pane, cx);
|
||||
let should_activate = activate_pane || self.has_focus;
|
||||
self.activate_item(index_to_activate, should_activate, should_activate, cx);
|
||||
}
|
||||
|
||||
let item = self.items.remove(item_index);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue