From 955cd1e7208c4b952fa2a74d4667d4612e2f62ca Mon Sep 17 00:00:00 2001 From: "hbono@chromium.org" Date: Tue, 14 Jul 2009 07:03:46 +0000 Subject: A quick fix for Issue 16597. Our autofill code handles keyboard events by itself and it prevents dispatch a return key to WebKit when the key is comsumed by the autofill. Unfortunately, this code is enclosed with "#if defined(OS_WIN)" and "#endif". This change just activates this code on Linux. BUG=16597 "Prevents submitting a form when pressing a return key in an auto-fill popup" TEST=Type a return key on an auto-fill popup and verify this is not submitted. Review URL: http://codereview.chromium.org/149517 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@20612 0039d316-1c4b-4281-b951-d872f2087c98 --- webkit/glue/webview_impl.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/webkit/glue/webview_impl.cc b/webkit/glue/webview_impl.cc index fe9348d..a29836d 100644 --- a/webkit/glue/webview_impl.cc +++ b/webkit/glue/webview_impl.cc @@ -669,7 +669,7 @@ bool WebViewImpl::AutocompleteHandleKeyEvent(const WebKeyboardEvent& event) { return false; if (autocomplete_popup_->handleKeyEvent(MakePlatformKeyboardEvent(event))) { -#if defined(OS_WIN) +#if defined(OS_WIN) || defined(OS_LINUX) // We need to ignore the next Char event after this otherwise pressing // enter when selecting an item in the menu will go to the page. if (WebInputEvent::RawKeyDown == event.type) -- cgit v1.1