summaryrefslogtreecommitdiffstats
path: root/chrome/renderer/render_view.cc
diff options
context:
space:
mode:
authorhbono@chromium.org <hbono@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2008-11-17 08:36:34 +0000
committerhbono@chromium.org <hbono@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2008-11-17 08:36:34 +0000
commit9f23f59692cd588105bf8813b122e4e5aaa702d1 (patch)
tree3a86a655cbadaac641a0b47d690b558e49eb9a98 /chrome/renderer/render_view.cc
parent01ba8f51513c615c2d54ed3ea8f26d9d8872af59 (diff)
downloadchromium_src-9f23f59692cd588105bf8813b122e4e5aaa702d1.zip
chromium_src-9f23f59692cd588105bf8813b122e4e5aaa702d1.tar.gz
chromium_src-9f23f59692cd588105bf8813b122e4e5aaa702d1.tar.bz2
A workaround fix for Issue 343 "Chinese Sogou input method lose first initial letter".
This issue is caused by our IME code that does not filter out focus events raised by an IME function of WebKit, WebCore::Editor::setComposition(). Its details are listed below: 1. WebKit sometimes creates a WebCore::EditingText instance and moves the input focus to the instance while updating a composition string in the Editor::setComposition() function; 2. Our IME code automatically finishes the ongoing composition everytime when WebKit moves the input focus to the WebCore::EditingText instance. As a wordaround for this issue, this change ignores focus events while a renderer process updates a composition string with the Editor::setComposition() function. Review URL: http://codereview.chromium.org/10827 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@5556 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/renderer/render_view.cc')
-rw-r--r--chrome/renderer/render_view.cc6
1 files changed, 4 insertions, 2 deletions
diff --git a/chrome/renderer/render_view.cc b/chrome/renderer/render_view.cc
index 7e812a45..3c041cb 100644
--- a/chrome/renderer/render_view.cc
+++ b/chrome/renderer/render_view.cc
@@ -2210,8 +2210,10 @@ void RenderView::SetInputMethodState(bool enabled) {
// Save the updated IME status and mark the input focus has been updated.
// The IME status is to be sent to a browser process next time when
// the input caret is rendered.
- ime_control_updated_ = true;
- ime_control_new_state_ = enabled;
+ if (!ime_control_busy_) {
+ ime_control_updated_ = true;
+ ime_control_new_state_ = enabled;
+ }
}
void RenderView::ScriptedPrint(WebFrame* frame) {