Bug 20198

Summary: [Qt] Copy key sequence doesn't work in non-editable areas.
Product: WebKit Reporter: Erik L. Bunce <elbunce>
Component: WebKit QtAssignee: Nobody <webkit-unassigned>
Status: RESOLVED FIXED    
Severity: Normal    
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Mac   
OS: OS X 10.5   
Attachments:
Description Flags
patch to add Copy handling for non-editable sections of a page. hausmann: review+

Description Erik L. Bunce 2008-07-28 11:01:57 PDT
Can be demonstrated using QtLauncher from SVN r35408.
1) Navigate to any site.
2) Make a selection in a non-editable text area.  Note that the Copy action is now enabled.
3) Use the local copy key sequence (CTRL+C, etc.) 
4) Attempt to paste into your favorite text editor, note you'll get the previous clipboard contents since the copy will not have been performed.

This is because it is only checked for in editorActionForKeyEvent(), the calling of which is inappropriate outside of editable areas.
Comment 1 Erik L. Bunce 2008-07-28 11:04:23 PDT
Created attachment 22524 [details]
patch to add Copy handling for non-editable sections of a page.
Comment 2 Simon Hausmann 2008-08-04 02:38:14 PDT
Comment on attachment 22524 [details]
patch to add Copy handling for non-editable sections of a page.

Ahh, I ran into this bug a few times and I always wondered what it was, since I did not see it in my daily use of QtWebKit in Arora. But I realize that's only because the browser there has its own Copy handling.

Thanks for the patch!
Comment 3 Simon Hausmann 2008-08-04 07:03:49 PDT
Landed in r35535