WebKit should reset focus and generate a focus change event when a form is submitted using the return key. Currently, the focus controller is not triggered and the WebViewClient is not informed that the focused element has lost focus.
Created attachment 92633 [details] Patch
> WebKit should Why should WebKit do that?
(In reply to comment #2) > > WebKit should > > Why should WebKit do that? Hi Alexey, thanks for looking into this. As I understand, the WebViewClient is notified through WebViewClient::focusedNodeChanged() whenever there is a change of focus on the webpage. When a form is submitted using the return key, the node currently focused looses focus. But no notification is sent to the WebViewClient because FocusController is never informed.
(In reply to comment #3) > When a form is submitted using the return key, the node currently focused looses focus. I don't think so. If a form target is an iframe, the text field doesn't lost focus.
Comment on attachment 92633 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=92633&action=review > Source/WebCore/ChangeLog:10 > + No new tests. (OOPS!) Need a test.
Created attachment 93031 [details] Patch
(In reply to comment #5) > (From update of attachment 92633 [details]) > View in context: https://bugs.webkit.org/attachment.cgi?id=92633&action=review > > > Source/WebCore/ChangeLog:10 > > + No new tests. (OOPS!) > > Need a test. Hi Alexey,Kent... I have added a test to the patch to illustrate the issue. The Test fails on the last expectation due to the lack of focus change events. I have also added a possible fix to the patch. Please have a look.
Attachment 93031 [details] did not pass style-queue: Failed to run "['Tools/Scripts/check-webkit-style', '--diff-files', u'ChangeLog', u'Source/WebCore/loader/FrameL..." exit_code: 1 Source/WebKit/chromium/tests/WebFrameTest.cpp:36: Alphabetical sorting problem. [build/include_order] [4] Total errors found: 1 in 4 files If any of these errors are false positives, please file a bug against check-webkit-style.
Comment on attachment 93031 [details] Patch Attachment 93031 [details] did not pass chromium-ews (chromium-xvfb): Output: http://queues.webkit.org/results/8687100
I confirmed 'blur' event was not fired in such case with IE9, Firefox4, and Opera 11. So I'm negative about adding setFocusedNode() call. Varun, What problem are you trying to solve?
Comment on attachment 93031 [details] Patch r- because of Chromium build error.