Skip to content

Commit

Permalink
Don't make labels focusable by default (#3937)
Browse files Browse the repository at this point in the history
* Closes #3910
  • Loading branch information
emilk authored Feb 1, 2024
1 parent 67b796f commit 520b28c
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 520b28c

Please sign in to comment.