Skip to content

Commit

Permalink
Prevent text from being cleared when selected due to winit IME (#3376)
Browse files Browse the repository at this point in the history
Closes #3374
  • Loading branch information
YgorSouza authored Sep 23, 2023
1 parent 33a0f50 commit d77c446
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion crates/egui-winit/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -291,7 +291,7 @@ impl State {
.events
.push(egui::Event::CompositionEnd(text.clone()));
}
winit::event::Ime::Preedit(text, ..) => {
winit::event::Ime::Preedit(text, Some(_)) => {
if !self.input_method_editor_started {
self.input_method_editor_started = true;
self.egui_input.events.push(egui::Event::CompositionStart);
Expand All @@ -300,6 +300,7 @@ impl State {
.events
.push(egui::Event::CompositionUpdate(text.clone()));
}
winit::event::Ime::Preedit(_, None) => {}
};

EventResponse {
Expand Down

0 comments on commit d77c446

Please sign in to comment.