Skip to content

Commit

Permalink
Remove the placeholder text when IME is activated in text input
Browse files Browse the repository at this point in the history
  • Loading branch information
rhysd committed Feb 4, 2025
1 parent 782b96b commit eedaa37
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 eedaa37

Please sign in to comment.