Browse Source

Fix: Backspace not working after IME input (#4912)

Fix: Changed the handling method of `Ime::Preedit(_, None)`

Fix: backspace fail after ime input

* Related #4358
* Related #4430 
* Related #4436
* Related #4794 
* Related #4896
* Closes #4908 

Issues: backspace fail after ime input
* #4908 (Chinese)

Changed the handling method of `Ime::Preedit(_, None)`
pull/4922/head
rustbasic 3 months ago
committed by GitHub
parent
commit
76fe6c855b
No known key found for this signature in database GPG Key ID: B5690EEEBB952194
  1. 5
      crates/egui-winit/src/lib.rs

5
crates/egui-winit/src/lib.rs

@ -341,8 +341,7 @@ impl State {
// We use input_method_editor_started to manually insert CompositionStart
// between Commits.
match ime {
winit::event::Ime::Enabled => {}
winit::event::Ime::Preedit(_, None) => {
winit::event::Ime::Enabled => {
self.ime_event_enable();
}
winit::event::Ime::Preedit(text, Some(_cursor)) => {
@ -357,7 +356,7 @@ impl State {
.push(egui::Event::Ime(egui::ImeEvent::Commit(text.clone())));
self.ime_event_disable();
}
winit::event::Ime::Disabled => {
winit::event::Ime::Disabled | winit::event::Ime::Preedit(_, None) => {
self.ime_event_disable();
}
};

Loading…
Cancel
Save