Bug 9640

Summary: GMail Editor: window.focus() called on keyDown
Product: WebKit Reporter: Justin Garcia <justin.garcia>
Component: HTML EditingAssignee: Nobody <webkit-unassigned>
Status: RESOLVED FIXED    
Severity: Normal CC: ap, c.petersen87, ian, mdavids
Priority: P2 Keywords: GoogleBug, InRadar
Version: 420+   
Hardware: Mac   
OS: OS X 10.4   
See Also: https://bugs.webkit.org/show_bug.cgi?id=167537
Bug Depends on:    
Bug Blocks: 9638    

Description Justin Garcia 2006-06-28 15:18:41 PDT
The arrow keys change focus to the Subject: field instead of moving the caret around.
Comment 1 Justin Garcia 2006-06-28 16:58:20 PDT
On keyDown,  GMail calls window.focus(), which focuses the main frame, which kills the selection in the editable frame.  Why are they calling window.focus()?
Comment 2 David Kilzer (:ddkilzer) 2006-07-12 21:58:24 PDT
GMail is Google.

Comment 3 Chris Petersen 2006-10-16 12:37:47 PDT
Yes, I'm running into this problem too.

Pressing "< " (home) or ">" (end) places focus out of the message body field and puts the caret in the TO field.

Same thing happens when pressing ctrl-"<" or ctrl-">" in attempting to move the caret to the start or end of line. Very annoying...
Comment 4 Justin Garcia 2006-10-30 18:02:11 PST
*** Bug 10988 has been marked as a duplicate of this bug. ***
Comment 5 Justin Garcia 2006-10-30 18:04:03 PST
*** Bug 11298 has been marked as a duplicate of this bug. ***
Comment 6 Justin Garcia 2006-11-08 17:25:47 PST
Confirmed that the arrow key problem goes away when I comment out the call to frame->focus() in KJSWindow::focus.
Comment 7 Justin Garcia 2006-11-08 17:27:45 PST
Confirmed that 10988 works correctly when I comment out the call to
frame->focus() in KJSWindow::focus.
Comment 8 Justin Garcia 2006-11-08 17:28:37 PST
Ditto for 11298.
Comment 9 Justin Garcia 2006-12-13 15:45:19 PST
This is in radar as <rdar://problem/4810960>
Comment 10 Michael Davidson 2007-01-12 09:32:52 PST
I think this is a WebKit bug. Repro here:

http://bantha.org/~mdavids/safari/safari.html

Inside the iframe, key events like 'a' and 'b' only trigger the inner event handler. But arrow keys and Cmd-A trigger both error handlers. This is why you're seeing that behavior in Gmail.
Comment 11 Justin Garcia 2007-01-15 19:16:18 PST
r18875