Skip to content

Commit

Permalink
Don't make labels focusable by default (emilk#3937)
Browse files Browse the repository at this point in the history
* Closes emilk#3910
  • Loading branch information
emilk authored and hacknus committed Oct 30, 2024
1 parent 8bb5116 commit daa5613
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion crates/egui/src/widgets/label.rs
Original file line number Diff line number Diff line change
Expand Up @@ -130,11 +130,12 @@ impl Label {
// we prioritize touch-scrolling:
let allow_drag_to_select = ui.input(|i| !i.any_touches());

let select_sense = if allow_drag_to_select {
let mut select_sense = if allow_drag_to_select {
Sense::click_and_drag()
} else {
Sense::click()
};
select_sense.focusable = false; // Don't move focus to labels with TAB key.

sense = sense.union(select_sense);
}
Expand Down

0 comments on commit daa5613

Please sign in to comment.