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

Bug 382143

Summary: [Safari][Win] Copy does not work. Inserts weird characters at the end of the line
Product: [ECD] Orion Reporter: Silenio Quarti <Silenio_Quarti>
Component: EditorAssignee: Silenio Quarti <Silenio_Quarti>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: Mike_Wilson
Version: 0.5   
Target Milestone: 0.5   
Hardware: PC   
OS: Windows 7   
Whiteboard:

Description Silenio Quarti CLA 2012-06-08 14:50:02 EDT
1) Open a file in the editor (textView.js) on Safari/Windows. This works fine on Safari/Mac.
2) Ctrl+A to select the whole contents of the file.
3) Ctrl+C to copy the contents of the file
4) Paste contents in another app (wordpad).

Note that only the visible lines are copied. Note also that there are weird characters at the end of the line.
Comment 1 Silenio Quarti CLA 2012-06-08 14:53:06 EDT
The problem happens because 

event.clipboardData.setData("text/plain", "some text")

fails on Safari/Windows and returns false.

We need to run our alternative code to copy text when that happens. Same code that is used on Firefox.