Repository navigation
WPF - IME Fix Korean character emitting issue - #3054
Conversation
Fixes a Korean IME related problem. A user cannot make a word or a sentence by progressing (producing) a single Korean character. Current experimental handler fails to 'emit' a composed Korean character.
|
✅ Build CefSharp 79.1.360-CI3434 completed (commit 74994e1d8b by @billshinji) |
| string text = string.Empty; | ||
|
|
||
| var underlines = new List<CompositionUnderline>(); | ||
| int compositionStart = 0; |
There was a problem hiding this comment.
Instead of hosting these values up, just pass in an empty array and 0 to ImeSetComposition please. Passing in values directly makes the code clearer.
Move underlines and compositionStart back to their original place.
|
✅ Build CefSharp 79.1.360-CI3435 completed (commit b5f097effd by @billshinji) |
| { | ||
| string text = string.Empty; | ||
|
|
||
There was a problem hiding this comment.
Please revert formatting change please.
| var underlines = new List<CompositionUnderline>(); | ||
| int compositionStart = 0; | ||
|
|
||
There was a problem hiding this comment.
Please revert formatting change please.
There was a problem hiding this comment.
Oh the whitespaces! I see. Sorry for the inconvenience. :-)
|
✅ Build CefSharp 79.1.360-CI3436 completed (commit d58235e339 by @billshinji) |
|
Thanks, hopefully others can test and report back. |
Fixes [issue-number]
Summary: [summary of the change and which issue is fixed here]
Changes: [specify the structures changed]
just below the following line inside the function
OnImeComposition()owner.GetBrowserHost().ImeCommitText(text, new Range(int.MaxValue, int.MaxValue), 0);string text = string.Empty;) in order to reference 'underlines' and 'compositionStart' in the newly-added code above:I also figured out there is no side effects to Japanese or Chinese IME even if I skipped the
iftest (if (languageCodeId == ImeNative.LANG_KOREAN)) but I don't want to make any side effects not found during my own test. It is 'experimental' anyway and we need to improve the WPF IME problem over time.How Has This Been Tested?
Using CefSharp.Wpf.Example.SimpleMainWindow.xaml, (and plugging in the experimental IME keyboard handler of course) I typed several Korean, Japanese, and Chinese sentences.
Windows 10.0.18363.592 (x64) - Korean, Japanese, and Chinese IME installed
Screenshots (if appropriate):
Types of changes
Checklist: