From 1b0fc8a20e50ff0c47757f4485245b859c32c43d Mon Sep 17 00:00:00 2001 From: Ivy Date: Tue, 3 Sep 2024 14:36:00 -0700 Subject: [PATCH] fixing ime cursor not advancing with japanese input --- src/text_agent.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/text_agent.rs b/src/text_agent.rs index 9ae6a561..8a76d981 100644 --- a/src/text_agent.rs +++ b/src/text_agent.rs @@ -150,10 +150,10 @@ pub fn install_text_agent( if let Some(true) = is_mobile() { let input_clone = input.clone(); let sender_clone = sender.clone(); - let closure = Closure::wrap(Box::new(move |_event: web_sys::InputEvent| { + let closure = Closure::wrap(Box::new(move |event: web_sys::InputEvent| { let text = input_clone.value(); - if !text.is_empty() { + if !text.is_empty() && !event.is_composing() { input_clone.set_value(""); if text.len() == 1 { input_clone.blur().ok();