Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 334590

Summary: [client][editor] Clipboard issues
Product: [ECD] Orion Reporter: Felipe Heidrich <eclipse.felipe>
Component: EditorAssignee: Project Inbox <orion.editor-inbox>
Status: RESOLVED WONTFIX QA Contact:
Severity: normal    
Priority: P3 CC: eclipse.felipe, mamacdon, Silenio_Quarti, simon_kaegi
Version: unspecified   
Target Milestone: ---   
Hardware: PC   
OS: Windows 7   
Whiteboard:

Description Felipe Heidrich CLA 2011-01-17 16:58:36 EST
Generally the browsers only allow javascript code to access the system clipboard during the handling for clipboard events.
For example, during a "copy" and a "cut" event it is possible to use clipboardData.setData("text/plain", text); to put content in the clipboard.
During a "paste" event is is possible to use clipboardData.getData("text/plain") to get the content from the clipboard.

Any other time these action will raise a security exception.
This is problem for the editor because it needs access to clipboard during toolbar actions or (custom) context menu actions.

IE: does not have the problem, the clipboard is always accessible.

FF: the clipboard can be accessible if:
"Copy,cut and paste will not work on the editor by default because firefox does not allow javascript code to access the clipboard.

To change that the user can open about:config or edit %appdata%\Mozilla\Firefox\Profiles\xxxx.default\user.js adding something like this:
user_pref("capability.policy.policynames", "allowclipboard");
user_pref("capability.policy.allowclipboard.sites", "http://localhost:8080 http://ssqwin7x64.ottawa.ibm.com:8080";);
user_pref("capability.policy.allowclipboard.Clipboard.cutcopy", "allAccess");
user_pref("capability.policy.allowclipboard.Clipboard.paste", "allAccess");

Alternatively, it is lot easier to use a little app called AllowClipboard Helper (firefox add-on)
After you install the tool, nagivate to the page you need to grant access and in the  Menu bar choose Tools->AllowClipboard Helper.
It will open a window already if the name of the host filled in.

Probably, you will need to change it a bit.
For example, if the URL is http://localhost:8080/webeditor/samples/demo.html
AllowClipboard Helper will put only localhost in the entry for you.
You need to change it to http://localhost:8080 (no slash at the end), and click okay.

Restart firefox."

Chrome: Not accessible
But, there is some experimental API for clipboard, but it seems to work only for extensions (plugins).

http://code.google.com/chrome/extensions/experimental.html
Comment 1 John Arthorne CLA 2015-05-05 14:53:27 EDT
Closing as part of a mass clean up of inactive bugs. Please reopen if this problem still occurs or is relevant to you. For more details see:

https://dev.eclipse.org/mhonarc/lists/orion-dev/msg03444.html