Bug 1024130 - [Translation Editor] Cut and Paste Function disabled for Firefox
[Translation Editor] Cut and Paste Function disabled for Firefox
Status: CLOSED DUPLICATE of bug 1062508
Product: Zanata
Classification: Community
Component: Performance (Show other bugs)
3.1
Unspecified Unspecified
high Severity high
: ---
: ---
Assigned To: Patrick Huang
Ding-Yi Chen
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2013-10-28 19:21 EDT by croe@redhat.com
Modified: 2014-05-05 01:23 EDT (History)
7 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2014-05-05 01:23:25 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
Screenshot of broken words in source text in Zanata Editor when Use syntax highlighting is unchecked (35.08 KB, image/png)
2014-02-26 18:37 EST, croe@redhat.com
no flags Details

  None (edit)
Description croe@redhat.com 2013-10-28 19:21:27 EDT
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 19:43:19 EDT
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-28 20:16:36 EDT
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-28 23:10:38 EDT
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-12 20:56:47 EST
Does the recent codemirror upgrade fix this?
Comment 5 Sean Flanigan 2014-02-13 20:40:54 EST
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-13 23:56:15 EST
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 00:02:02 EST
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 00:31:05 EST
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 00:54:59 EST
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 00:55:52 EST
*documents (oops)
Comment 11 Sean Flanigan 2014-02-14 02:21:27 EST
(In reply to croe@redhat.com 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 18:37:47 EST
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 18:40:02 EST
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-26 20:42:01 EST
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-26 22:56:38 EST
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-04-30 21:30:23 EDT
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-01 21:42:17 EDT
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 00:43:54 EDT
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 00:52:19 EDT
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@redhat.com 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-04 21:54:21 EDT
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-04 21:56:20 EDT
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 01:23:25 EDT
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 ***

Note You need to log in before you can comment on or make changes to this bug.