Fix tab bar button's focus handling lagging behind
This fixes https://github.com/zed-industries/community/issues/2442 for me. Previously, the tab bar buttons would stay when the chat panel was opened (and received focus) until something else was drawn (or caused a render?) With this change, the tab bar buttons are only shown if the pane was focus. I'm not sure about the side-effects of this, but the toolbar still seems to work fine.
This commit is contained in:
@@ -1470,7 +1470,7 @@ impl Pane {
|
||||
),
|
||||
)
|
||||
})
|
||||
.when(self.was_focused || self.has_focus(cx), |tab_bar| {
|
||||
.when(self.has_focus(cx), |tab_bar| {
|
||||
tab_bar.end_child({
|
||||
let render_tab_buttons = self.render_tab_bar_buttons.clone();
|
||||
render_tab_buttons(self, cx)
|
||||
|
||||
Reference in New Issue
Block a user