1
0
mirror of https://github.com/emilk/egui.git synced 2026-06-27 15:13:12 -04:00

Don't make labels focusable by default (#3937)

* Closes https://github.com/emilk/egui/issues/3910
This commit is contained in:
Emil Ernerfeldt
2024-02-01 18:08:36 +01:00
committed by GitHub
parent 67b796faee
commit 520b28ce22

View File

@@ -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);
}