-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
IME Candidate Window wrong behavior #15437
Comments
Ime should be reset after focus change/loss |
We might be able to change this by introducing a way to cancel current composition. What happens with the current composition. Is it committed as is or discarded? |
Yes, it is one of the reasons that should reset it but not the only expected. In checked frameworks, Windows elements, and browsers I mentioned above the focus loss isn't the only reason to reset Ime. The clicking anywhere outside the candidate window even on the surface of the focused control is the reason too. It can be checked by opening any element of Windows or browser. But, if it is the Avalonia behavior I would like to have a legal way to close it programmatically for my control.
If you mean what will happen if I use this code to close the composition:
then it is discarded but I can avoid this by saving the last preedit text. I just need the candidate window to be hidden automatically if the user clicks outside of it. In this case, the text shouldn't be discarded. In WPF, WinForms etc. it isn't discarded. Or, the API to close it would be an option too. |
Describe the bug
The IME candidate window isn't closed if you click outside of it and in the same control it is used for. I develop custom control and found the only way to make the candidate window close is to put
<AvaloniaAccessUnstablePrivateApis>true</AvaloniaAccessUnstablePrivateApis>
into the<PropertyGroup>
section of your project '.csproj' file and use this code inside of your Control to close it programmatically:But this way uses unstable private API so it isn't a confident solution.
I've checked the behavior in other frameworks like WinForms, and WPF, in Windows elements like Explorer, and Notepad, and browsers like Chrome and Edge. All of them close the IME Candidate Window if you click outside of the candidate window even if you click the focused element the candidate window was opened for.
To Reproduce
TextBox
and switch to the Japanese Hiragana language.The IME Candidate Window wasn't hidden.
Expected behavior
The IME Candidate Window is hidden.
Avalonia version
11.0.10
OS
Windows
Additional context
No response
The text was updated successfully, but these errors were encountered: