Skip to content

Commit

Permalink
fixing ime cursor not advancing with japanese input
Browse files Browse the repository at this point in the history
  • Loading branch information
Ivy committed Sep 3, 2024
1 parent e55668a commit 1b0fc8a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/text_agent.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down

0 comments on commit 1b0fc8a

Please sign in to comment.