Skip to content

Commit

Permalink
Merge pull request #2785 from rhysd/fix-placeholder-ime-pos
Browse files Browse the repository at this point in the history
Remove the placeholder text when IME is activated in text input
  • Loading branch information
hecrj authored Feb 4, 2025
2 parents 782b96b + eedaa37 commit 1f9723a
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion widget/src/text_input.rs
Original file line number Diff line number Diff line change
Expand Up @@ -582,7 +582,13 @@ where
};

let draw = |renderer: &mut Renderer, viewport| {
let paragraph = if text.is_empty() {
let paragraph = if text.is_empty()
&& state
.is_ime_open
.as_ref()
.map(|preedit| preedit.content.is_empty())
.unwrap_or(true)
{
state.placeholder.raw()
} else {
state.value.raw()
Expand Down

0 comments on commit 1f9723a

Please sign in to comment.