Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove the placeholder text when IME is activated in text input #2785

Merged
merged 1 commit into from
Feb 4, 2025

Conversation

rhysd
Copy link
Contributor

@rhysd rhysd commented Feb 4, 2025

This PR fixes that the placeholder text is not removed when IME is activated.

Problem

When the preedit window is opened, the placeholder text is not removed. This is weird because the text input is already editing the content but the placeholder text is still there.

before.mp4

Solution

This PR removes the placeholder text when the input method is activated even if the text input content is not committed. This is the same behavior as <input> element of web browsers.

after.mp4

@rhysd rhysd force-pushed the fix-placeholder-ime-pos branch from 23ed2b6 to e4ff212 Compare February 4, 2025 15:47
@rhysd rhysd changed the title Fix position of preedit doesn't consider placeholder in TextInput Remove the placeholder text when IME is activated in text input Feb 4, 2025
@rhysd rhysd force-pushed the fix-placeholder-ime-pos branch from e4ff212 to eedaa37 Compare February 4, 2025 15:53
@hecrj hecrj added this to the 0.14 milestone Feb 4, 2025
Copy link
Member

@hecrj hecrj left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@hecrj hecrj merged commit 1f9723a into iced-rs:master Feb 4, 2025
15 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants