Fix tab auto focus on TabCloseForce
Auto focus should only trigger if the current tab is selected or else closing an unfocused tab would move the focused tab. See: pop-os/cosmic-files#1949
This commit is contained in:
parent
4ac0da3af9
commit
e4006945c6
1 changed files with 3 additions and 1 deletions
|
|
@ -2787,7 +2787,9 @@ impl Application for App {
|
|||
}
|
||||
Message::TabCloseForce(entity) => {
|
||||
// Activate closest item
|
||||
if let Some(position) = self.tab_model.position(entity) {
|
||||
if self.tab_model.active() == entity
|
||||
&& let Some(position) = self.tab_model.position(entity)
|
||||
{
|
||||
if position > 0 {
|
||||
self.tab_model.activate_position(position - 1);
|
||||
} else {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue