Bug 39689 - Moving focus in Cmd+V keydown event handler should redirect paste
Summary: Moving focus in Cmd+V keydown event handler should redirect paste
Status: NEW
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebCore Misc. (show other bugs)
Version: 528+ (Nightly build)
Hardware: Macintosh OS X 10.6
: P2 Normal
Assignee: Nobody
URL: http://pastebin.me/4134eda0cca5e2582e...
Depends on:
Reported: 2010-05-25 15:00 PDT by Dale Harvey
Modified: 2012-01-09 17:08 PST (History)
3 users (show)

See Also:

test case (623 bytes, text/html)
2010-05-26 11:56 PDT, Alexey Proskuryakov
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Dale Harvey 2010-05-25 15:00:54 PDT
Have some text on the clipboard, press CMD+V without the textarea on the demo being in focus, it is supposed to focus textarea on keydown and in turn capture the pasted text, instead pasted text is lost but textarea is focused.

works on chrome + firefox and apparently snow leopard, broken on snow snow leopard
Comment 1 Alexey Proskuryakov 2010-05-26 11:55:38 PDT
This worked for me on Leopard, but didn't work on SL.
Comment 2 Alexey Proskuryakov 2010-05-26 11:56:28 PDT
Created attachment 57123 [details]
test case

Attaching the same test, in case it expires from pastebin.
Comment 3 Alexey Proskuryakov 2010-05-26 11:58:19 PDT
Of course, this shouldn't work when focus moves cross-frame.
Comment 4 Mark Kristensson 2012-01-09 14:20:53 PST
This bug also occurs on Safari on Lion and appears to be worse than on Snow Leopard. On SL, you could change the focus in a document/body level beforePaste event (to a text area/field) and then the text would get pasted into that control. However, the beforePaste event no longer fires at the document/body level in Safari (but does, as does the paste event, in Chrome).
Comment 5 Alexey Proskuryakov 2012-01-09 17:08:57 PST
The new part is now tracked as bug 75891.