-
-
Notifications
You must be signed in to change notification settings - Fork 2.4k
Fix incorrect CandidateWindow position when using Pinyin IMEs in Windows #18759
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
Conversation
84add8a
to
8fc9d59
Compare
8fc9d59
to
93d2d76
Compare
You can test this PR using the following package version. |
|
@cla-avalonia agree |
93d2d76
to
3a00e24
Compare
You can test this PR using the following package version. |
TSF requires a text store implementation etc. |
I noticed that version 11.3.0-rc1 has already been released. Would it be possible to merge this bug fix |
You can test this PR using the following package version. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you! As a non-Chinese speaker, I've tested as best as I can, but this was obviously not exhaustive. I'm going to trust the screenshots here.
Thank you! |
What does the pull request do?
This pull request addresses an issue where the IME CandidateWindow is not correctly positioned when using Pinyin IMEs on Windows. The fix ensures that the CandidateWindow aligns properly with the caret position, improving user experience when typing Chinese characters with Pinyin Input Method Editors.
What is the current behavior?
The CandidateWindow's top position does not align correctly with the caret position. This behavior is inconsistent with most major UI frameworks and leads to a poor user experience when inputting Chinese characters using Pinyin IMEs.
This issue was observed in different Chinese IMEs, including older ones on Windows 7.
What is the updated/expected behavior with this PR?
The CandidateWindow now aligns correctly with the caret position. This behavior has been tested on multiple Chinese IMEs, including those available on Windows 7, and all display as expected.
The fix ensures compatibility across various IMEs and improves usability.
How was the solution implemented (if it's not obvious)?
Most Chinese input methods after Windows XP have been improved. However, the input method implementation in Avalonia appears to be based on the IMESharp code, which in turn follows logic originating from Chromium's code as early as 2008 or even earlier. Windows 7 was officially released on October 22, 2009, while Windows Vista was released on November 30, 2006.
Will Avalonia's Windows input method switch to TSF in the future? TSF has been a modern framework since Windows XP.
Perhaps we can also refer to the implementations of WPF (TSF) and modern Chromium (TSF).
If we implement TSF, it may potentially resolve many of the previous IME-related issues, though the workload would be significant.
Checklist
Breaking changes
Obsoletions / Deprecations
Fixed issues
Fixes #18748