mirror of
https://github.com/emilk/egui.git
synced 2026-09-03 15:20:05 -04:00
Fix dead-lock in TextEdit on touch-screens (#1118)
Introduced in https://github.com/emilk/egui/pull/1035 Fixes https://github.com/emilk/egui/issues/1116
This commit is contained in:
@@ -390,7 +390,8 @@ impl<'t> TextEdit<'t> {
|
||||
// dragging select text, or scroll the enclosing `ScrollArea` (if any)?
|
||||
// Since currently copying selected text in not supported on `egui_web`,
|
||||
// we prioritize touch-scrolling:
|
||||
let allow_drag_to_select = !ui.input().any_touches() || ui.memory().has_focus(id);
|
||||
let any_touches = ui.input().any_touches(); // separate line to avoid double-locking the same mutex
|
||||
let allow_drag_to_select = !any_touches || ui.memory().has_focus(id);
|
||||
|
||||
let sense = if interactive {
|
||||
if allow_drag_to_select {
|
||||
|
||||
Reference in New Issue
Block a user