Merge pull request #2785 from rhysd/fix-placeholder-ime-pos
Remove the placeholder text when IME is activated in text input
This commit is contained in:
commit
1f9723a929
1 changed files with 7 additions and 1 deletions
|
|
@ -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()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue