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:
1 parent
96807e1019
commit
ef7b2ab3b0
1 file changed
+2
-1
@@ -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);
|
||||
|
||||
Reference in new issue
Block a user