WPF - Japanese IME unable to enter space (#3455)

This is a fix in response to the issue of not emitting spaces in Japanese IME (from @karthikeyancdm).
After all, it turns out that ImeSetComposition() and ImeFinishComposingText() should be invoked regardless of the current language.
This commit is contained in:
billshinji
2021-03-22 13:07:54 +09:00
committed by Alex Maitland
parent e78e18fdb0
commit c51ec7ad9d
@@ -246,11 +246,8 @@ namespace CefSharp.Wpf.Experimental
if (ImeHandler.GetResult(hwnd, (uint)lParam, out text))
{
owner.GetBrowserHost().ImeCommitText(text, new Range(int.MaxValue, int.MaxValue), 0);
if (languageCodeId == ImeNative.LANG_KOREAN || languageCodeId == ImeNative.LANG_CHINESE)
{
owner.GetBrowserHost().ImeSetComposition(text, new CompositionUnderline[0], new Range(int.MaxValue, int.MaxValue), new Range(0, 0));
owner.GetBrowserHost().ImeFinishComposingText(false);
}
owner.GetBrowserHost().ImeSetComposition(text, new CompositionUnderline[0], new Range(int.MaxValue, int.MaxValue), new Range(0, 0));
owner.GetBrowserHost().ImeFinishComposingText(false);
}
else
{