Bug 1024130

Summary: [Translation Editor] Cut and Paste Function disabled for Firefox
Product: [Retired] Zanata Reporter: croe <croe>
Component: PerformanceAssignee: Patrick Huang <pahuang>
Status: CLOSED DUPLICATE QA Contact: Ding-Yi Chen <dchen>
Severity: high Docs Contact:
Priority: high    
Version: 3.1CC: aeng, croe, dchen, djansen, pahuang, sflaniga, zanata-bugs
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-05-05 05:23:25 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
Screenshot of broken words in source text in Zanata Editor when Use syntax highlighting is unchecked none

Description croe@redhat.com 2013-10-28 23:21:27 UTC
Description of problem: 

When I right click on a word selection or on a single word in the editor, I do not have the option to 'copy'. 
This is valid in Source text and in Target text.

I noticed that my colleague who used Fedora does not seem to have this problem. Yet, another colleague who ussed RHEL has the same problem than me, that is why I think there must be a connection.


Version-Release number of selected component (if applicable):


How reproducible:


Steps to Reproduce:
1.
2.
3.

Actual results:


Expected results:


Additional info:

Comment 1 Alex Eng 2013-10-28 23:43:19 UTC
croe, 

Which browser and version you using?
Are you trying to copy from source to translation? 
Or you are trying to copy a selection of word from source? 
Or you are trying to copy a selection of word from translation to somewhere else?
Is the problem with mouse right click copy paste or CTRL+C and CTRL+V? 

You mentioned your colleague managed to do that in Fedora, which browser and version they using? 

I managed to reproduce the issue in my firefox browser (version 24) using mouse right click. But CTRL+C and V works for me.

http://support.mozilla.org/en-US/questions/838119

http://en.kioskea.net/faq/13014-firefox-perform-a-copy-and-paste-on-protected-web-pages

Comment 2 croe@redhat.com 2013-10-29 00:16:36 UTC
Hi Alex,

I am using Firefox ESR 17.0.8
Yes, I am trying to copy a selection of words or html tags from Source to Translation panel on the right hand side of the source text panel
The problem is with mouse right click copy paste

My colleague is Francesco. He is whf today, so does not know which browser he uses on his machine at the office right now

CTRL+C and V does work but is not as efficient

Comment 3 Ding-Yi Chen 2013-10-29 03:10:38 UTC
Tested with Zanata 3.2-SNAPSHOT (20131029-0042)

The symptom croe describes can be confirmed with both Firefox version 17.0.8 ESR (RHEL6) and version 24.0 (Fedora 19).

That's cause by a component that Zanata team does not have direct control (CodeMirror, namely).

There are several workaround available at the moment.

1. Use other browser such as Chromium (or Chrome)
2. Turn off syntax highlighter in Translation Editor View
   (Click on the 3rd icon on the right panel, then turn off syntax highlighter)

Comment 4 Damian Jansen 2014-02-13 01:56:47 UTC
Does the recent codemirror upgrade fix this?

Comment 5 Sean Flanigan 2014-02-14 01:40:54 UTC
The codemirror upgrade was supposed to fix this or something similar, so let's retest.

(BTW if anyone knows that the other bug number was, please mark one of the bugs as duplicate if appropriate.)

Comment 6 Damian Jansen 2014-02-14 04:56:15 UTC
I can confirm that this bug appears on RHEL6 Firefox 26, but not on RHEL6 google-chrome 24.0.

Comment 7 Damian Jansen 2014-02-14 05:02:02 UTC
croe,
If so desired, you can turn off Syntax Highlighting in the options menu to get the right click copy-paste functionality back.

Comment 8 croe@redhat.com 2014-02-14 05:31:05 UTC
Thanks Damian, 

I just tested your workaround solution and it works. 

The only problem is that I have to untick Syntax Highlighting for every single document. 

It would be great to have it as default as you suggested on IRC

Comment 9 croe@redhat.com 2014-02-14 05:54:59 UTC
I just noticed something: once you tick off Syntax Highlighting on two document, it becomes default automatically for all other document in the higher level file.

Comment 10 croe@redhat.com 2014-02-14 05:55:52 UTC
*documents (oops)

Comment 11 Sean Flanigan 2014-02-14 07:21:27 UTC
(In reply to croe from comment #9)
> I just noticed something: once you tick off Syntax Highlighting on two
> document[s], it becomes default automatically for all other document in the
> higher level file.

Actually, should only be having to do it once (per session), not twice.  If you save your editor preferences, it should be automatically applied to future sessions as well.

Comment 12 croe@redhat.com 2014-02-26 23:37:47 UTC
Created attachment 868247 [details]
Screenshot of broken words in source text in Zanata Editor when Use syntax highlighting is unchecked

Comment 13 croe@redhat.com 2014-02-26 23:40:02 UTC
Yep, you are right, I seem to have to do it only once now. Nevertheless, there is still a little problem with the reading panes. For example, you will notice in the screenshot I have taken and attached to this message today that words are being cut in the middle of a word in the Source text (in English) like so:

access to the
m is controlled...

where the word 'them' is cut in the middle

other example:

Th
is means only users...

where the word 'This' is cut in the middle.

It would be appreciated if something could be done about that.

Comment 14 Sean Flanigan 2014-02-27 01:42:01 UTC
Corina, could you please check the existing Zanata bug list, and submit that word-wrapping problem as a new bug if appropriate?  We would also need details of your browser and the server version.

Comment 15 croe@redhat.com 2014-02-27 03:56:38 UTC
New bug created as per request Bug 1070541 called Word Wrapping issue in Zanata Editor when Syntax Highlighting is ticked off in order to enable Cut and Paste

Comment 16 Patrick Huang 2014-05-01 01:30:23 UTC
https://github.com/zanata/zanata-server/pull/379
as a workaround, user now is able to use ctrl-alt-h or ctrl-x then h to toggle between syntax highlight or plain text editor for current active row. It's a lot quicker to access good/working parts of both editor.

Comment 17 Patrick Huang 2014-05-02 01:42:17 UTC
commend 16 has an error. the shortcut will be ctrl-alt-h or alt-x then h.

Comment 18 croe@redhat.com 2014-05-02 04:43:54 UTC
I have tried to use the shortcuts described above to toggle btw synatx highlight or plain text, but it does not work

Also, please note that at home, I am using Fedora with Firefox and I do not have any problem with Cut & Paste (right click) at all, if this can help.

Comment 19 Patrick Huang 2014-05-02 04:52:19 UTC
This hasn't been released to production yet. The difference between RHEL and fedora may be due to different firefox version?
(In reply to croe from comment #18)
> I have tried to use the shortcuts described above to toggle btw synatx
> highlight or plain text, but it does not work
> 
> Also, please note that at home, I am using Fedora with Firefox and I do not
> have any problem with Cut & Paste (right click) at all, if this can help.

Comment 20 Ding-Yi Chen 2014-05-05 01:54:21 UTC
I have tested with Zanata 3.4.0-SNAPSHOT (git-server-3.3.1-257-gb0acc77)
and following browsers with code mirror (syntax highlighting enabled):

Firefox 24.5.0 (RHEL6)
Firefox 24.3.0 (RHEL7-beta)
Firefox 29.0 (Fedora 20)

They all works. 
Providing that you put your mouse insider the area you select.

Comment 21 Ding-Yi Chen 2014-05-05 01:56:20 UTC
Croe,

Would you mind trying the trick I found in comment #20 and see whether it works?

Comment 22 Ding-Yi Chen 2014-05-05 05:23:25 UTC
Patrick has tested it, Firefox 24.4.0 (RHEL6) but the trick did not work for him.

However, comment #17 and bug 1062508 has workaround for the problem.
Thus I closed it as duplicate for 1062508.

*** This bug has been marked as a duplicate of bug 1062508 ***