From c51ec7ad9da1cbff21c413975a885e040b8d5bcd Mon Sep 17 00:00:00 2001 From: billshinji <60197338+billshinji@users.noreply.github.com> Date: Mon, 22 Mar 2021 13:07:54 +0900 Subject: [PATCH] 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. --- CefSharp.Wpf/Experimental/WpfIMEKeyboardHandler.cs | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/CefSharp.Wpf/Experimental/WpfIMEKeyboardHandler.cs b/CefSharp.Wpf/Experimental/WpfIMEKeyboardHandler.cs index 103b2e8fe..64add3d16 100644 --- a/CefSharp.Wpf/Experimental/WpfIMEKeyboardHandler.cs +++ b/CefSharp.Wpf/Experimental/WpfIMEKeyboardHandler.cs @@ -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 {