Fix`TextEdit` selection when placed in a `Scene`. (#5791)
* Closes https://github.com/emilk/egui/issues/5789 * [x] I have followed the instructions in the PR template While this change fixes the TextEdit specific issue, I'm worried that the underlying problem is more fundamental and could show up in other widgets, and I'm wondering if there's a more general solution?
This commit is contained in:
parent
d811940dcc
commit
eb7ca72534
|
|
@ -578,7 +578,7 @@ impl TextEdit<'_> {
|
|||
let painter = ui.painter_at(text_clip_rect.expand(1.0)); // expand to avoid clipping cursor
|
||||
|
||||
if interactive {
|
||||
if let Some(pointer_pos) = ui.ctx().pointer_interact_pos() {
|
||||
if let Some(pointer_pos) = response.interact_pointer_pos() {
|
||||
if response.hovered() && text.is_mutable() {
|
||||
ui.output_mut(|o| o.mutable_text_under_cursor = true);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue