Bug 9640
Summary: | GMail Editor: window.focus() called on keyDown | ||
---|---|---|---|
Product: | WebKit | Reporter: | Justin Garcia <justin.garcia> |
Component: | HTML Editing | Assignee: | 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 |
Justin Garcia
The arrow keys change focus to the Subject: field instead of moving the caret around.
Attachments | ||
---|---|---|
Add attachment proposed patch, testcase, etc. |
Justin Garcia
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()?
David Kilzer (:ddkilzer)
GMail is Google.
Chris Petersen
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...
Justin Garcia
*** Bug 10988 has been marked as a duplicate of this bug. ***
Justin Garcia
*** Bug 11298 has been marked as a duplicate of this bug. ***
Justin Garcia
Confirmed that the arrow key problem goes away when I comment out the call to frame->focus() in KJSWindow::focus.
Justin Garcia
Confirmed that 10988 works correctly when I comment out the call to
frame->focus() in KJSWindow::focus.
Justin Garcia
Ditto for 11298.
Justin Garcia
This is in radar as <rdar://problem/4810960>
Michael Davidson
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.
Justin Garcia
r18875