Bug 39689

Summary: Moving focus in Cmd+V keydown event handler should redirect paste
Product: WebKit Reporter: Dale Harvey <dale>
Component: WebCore Misc.Assignee: Nobody <webkit-unassigned>
Status: NEW ---    
Severity: Normal CC: ap, mkbitbucket, sam
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Macintosh   
OS: OS X 10.6   
URL: http://pastebin.me/4134eda0cca5e2582e7e522486a406ca
Attachments:
Description Flags
test case none

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.