Skip to content

Commit

Permalink
Update builder.rs
Browse files Browse the repository at this point in the history
  • Loading branch information
rustbasic authored Aug 27, 2024
1 parent 104bef2 commit bb0dfe4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions crates/egui/src/widgets/text_edit/builder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -746,8 +746,8 @@ impl<'t> TextEdit<'t> {
}
}

// IME-related processing when focus is lost in IME enabled state.
if state.ime_enabled && response.lost_focus() {
// IME-related processing when focus is gained or lost in IME enabled state.
if state.ime_enabled && (response.gained_focus() || response.lost_focus()) {
state.ime_enabled = false;
if let Some(mut ccursor_range) = state.cursor.char_range() {
ccursor_range.secondary.index = ccursor_range.primary.index;
Expand Down

0 comments on commit bb0dfe4

Please sign in to comment.