From dd56f3b7546a14ef7cd20067959205d6559a51e3 Mon Sep 17 00:00:00 2001 From: rustbasic <127506429+rustbasic@users.noreply.github.com> Date: Wed, 17 Apr 2024 22:40:37 +0900 Subject: [PATCH] Update builder.rs --- crates/egui/src/widgets/text_edit/builder.rs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/crates/egui/src/widgets/text_edit/builder.rs b/crates/egui/src/widgets/text_edit/builder.rs index 48c98c58b872..c48acbcd55aa 100644 --- a/crates/egui/src/widgets/text_edit/builder.rs +++ b/crates/egui/src/widgets/text_edit/builder.rs @@ -957,6 +957,7 @@ fn events( Event::ImeEnable | Event::CompositionStart => { state.has_ime = true; + state.ime_target_id = id; state.ime_cursor_range = cursor_range; None } @@ -984,6 +985,7 @@ fn events( state.has_ime = false; let mut ccursor; if !prediction.is_empty() + && state.ime_target_id == id && cursor_range.secondary.ccursor.index == state.ime_cursor_range.secondary.ccursor.index {