Bug 12243 - FCKeditor: Paste buttons are always disabled
Summary: FCKeditor: Paste buttons are always disabled
Status: RESOLVED DUPLICATE of bug 11335
Alias: None
Product: WebKit
Classification: Unclassified
Component: HTML Editing (show other bugs)
Version: 420+
Hardware: Mac OS X 10.4
: P2 Normal
Assignee: Nobody
URL: http://www.fckeditor.net/nightly/brow...
Depends on:
Blocks: 9915
  Show dependency treegraph
Reported: 2007-01-13 02:55 PST by webkit
Modified: 2008-01-30 06:57 PST (History)
1 user (show)

See Also:

TC (562 bytes, text/html)
2007-06-12 04:20 PDT, webkit
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description webkit 2007-01-13 02:55:05 PST
The paste (Normal Paste, Paste as Plain Text and Paste from Word) buttons never get enabled in the toolbar or in the context menu.
Comment 1 Justin Garcia 2007-05-14 15:28:37 PDT

*** This bug has been marked as a duplicate of 11335 ***
Comment 2 webkit 2007-06-12 04:19:33 PDT
(In reply to comment #1)
> *** This bug has been marked as a duplicate of 11335 ***

Justin, this bug seams to be related to queryCommandEnabled('Paste'), not to execCommand('Paste').

The 'Paste' command is one of commands defined in the execCommand "standards". So, it is extensively adopted. Here we have many things to think about. I'll try to give some justifications to make queryCommandEnabled work properly in this case, reflecting the Firefox behavior.

Even if WebKit decides that the execCommand('Paste') will never paste user's data, for security reasons (even if the user wanted that), queryCommandEnabled('Paste') is quite useful for us to understand that there is data available in the clipboard. So, it would be ok if queryCommandEnabled('Paste') returns "true" and execCommand('Paste') returns "false".

In FCKeditor, this is important so we can enable the interface buttons for pasting (using queryCommandEnabled). If we try to paste and execCommand returns false, we display a dialog to the end user, asking her to paste in that dialog by using the keyboard shortcuts. This is the current behavior with Firefox, and it would be wonderful to have it working in the same way with Safari.

I'm adding a TC to it, which shows the Safari X Firefox difference.
Comment 3 webkit 2007-06-12 04:20:37 PDT
Created attachment 14977 [details]
Comment 4 Justin Garcia 2007-06-13 14:20:23 PDT
I have a fix for this that Geoff has reviewed.  I'll be checking it in soon.
Comment 5 Eric Seidel (no email) 2007-11-22 11:32:52 PST
Just curious whatever happened to Justin's fix... did it get checked in?  The test case still fails on TOT.
Comment 6 Justin Garcia 2008-01-29 19:58:54 PST
This *is* a dupe of 11335 as far as I can tell.  The test case outputs false for queryCommandEnabled('Paste') because it *is* disabled, because of the security concerns mentioned in 11335.  Frederico, if I've got this wrong, please reopen.

*** This bug has been marked as a duplicate of 11335 ***
Comment 7 webkit 2008-01-30 06:57:16 PST
In theory, the current behavior is correct. In practice, it is a problem for us, as there is now way for us to simply know that there is data available in the clipboard (see comment #2). So now it is up to you guys (even if I can predict the way you are going to take with it).