linebender / linebender/druid

Closing the last tab does not change focus to any of the existing tabs

Open
#2,175 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Rust
Stars
9.7k
Forks
565
PR merge metrics
No merged PRs in 30d

Description

When I have a few dynamic tabs and I close the last tab, it does not select any of the existing tab.

The behaviour can be seen with the tabs example
```
cargo run --features="im" --example tabs
```

I could modify the [close button behaviour](https://github.com/linebender/druid/blob/f63ab1061d925d1156f082638455f0b25965e20e/druid/src/widget/tabs.rs#L326) to handle it, but I'm not sure if that would be the right approach for this.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Run the tabs example with `cargo run --features="im" --example tabs` to reproduce the focus behavior. Then inspect the close button behavior in `druid/src/widget/tabs.rs` at the linked location; done means closing the last dynamic tab selects one of the existing tabs.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
desktop
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
50/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.