Bug 968619

Summary: Editor: Difficulty in placing cursor at desired point and selecting exact part of text
Product: [Retired] Zanata Reporter: Yuko Katabami <ykatabam>
Component: UsabilityAssignee: Patrick Huang <pahuang>
Status: CLOSED NOTABUG QA Contact: Zanata-QA Mailling List <zanata-qa>
Severity: high Docs Contact:
Priority: high    
Version: 2.3CC: camunoz, croe, dchen, hpeters, mkim, pahuang, ykatabam, zanata-bugs
Target Milestone: ---Keywords: screened
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: 3.3.0-SNAPSHOT (20140213-0020) Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2015-03-17 00:42:35 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:

Description Yuko Katabami 2013-05-29 23:19:57 UTC
Description of problem:
When editing target string in the editor, it is difficult to place cursor to the point where I exactly want to place, or select a part of text.
It usually requires multiple clicks to place cursor.
To select text, zanata often does not allow me to highlight where I want to select.
This also might be related sensitivity of the cursor. 

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


How reproducible: Most of time 


Steps to Reproduce:
1. Choose a project and open the editor
2. Try to place cursor or select part of text (for example tagged words)

Actual results:
zanata does not allow precise pointing

Expected results:
It should be more precise and responsive

Additional info:

Comment 7 Hedda Peters 2014-02-03 01:33:51 UTC
May I please request for this issue to be prioritized. 

This issue is predominantly found in Firefox, which is why I switched to using Chromium instead. However, in Chromium the spell-checker does not work. So I'm now stuck between a rock and a hard place.

Comment 8 Carlos Munoz 2014-02-05 06:47:59 UTC
This seems to be related to an issue with CodeMirror: https://github.com/marijnh/CodeMirror/issues/1999
Version 3.21 of the code mirror editor already contains a fix.

Assigning to Patrick to fit it into next release. All editor manual tests should be verified again.

Comment 9 Patrick Huang 2014-02-07 00:54:53 UTC
https://github.com/zanata/zanata-server/pull/358

Comment 10 Ding-Yi Chen 2014-02-14 06:01:00 UTC
VERIFIED with commit d4627b2ebb39f845d3e24528d93d230059326ea4

Comment 11 Sean Flanigan 2014-03-20 05:47:41 UTC
Closing VERIFIED bugs for Zanata server 3.3.2.

Comment 13 Carlos Munoz 2014-03-21 04:45:57 UTC
Seems like it's still an issue in smaller proportion. With a long Japanese string (once that wraps to multiple lines, or by zooming in the browser), there's still a mismatch between the place where the cursor lies, and where typed characters appear.

Comment 14 Ding-Yi Chen 2014-03-28 03:45:28 UTC
Yuko,

1. Do you still experience the problem.
2. What's the version of Browser, system locale, and font you were using for browser?

Comment 15 Yuko Katabami 2014-03-28 05:34:26 UTC
(In reply to Ding-Yi Chen from comment #14)
> Yuko,
> 
> 1. Do you still experience the problem.
> 2. What's the version of Browser, system locale, and font you were using for
> browser?

Hi Ding,

I have been working on software UI projects for the past few days and those projects do not have much tags / long sentences involved and cannot tell right now, but I am back to docs project now and will monitor it and let you know the status dearly next week.

My browsers are:
chromium-30.0.1599.114-1.el6.x86_64
and
firefox-17.0.10-1.el6_4.x86_64

Kind regards,

Yuko

Comment 21 Carlos Munoz 2015-02-24 02:58:20 UTC
After talking to Patrick, we realized this is an issue with CodeMirror's syntax highlighting and editing. We were only able to reproduce this in some minor form in Japanese. It could also be related to the way spaces are being displayed on the editor (unconfirmed).

It is not probable that CodeMirror's dev team will spend time fixing the version we are currently using when they are already on a higher one. They will probably suggest we upgrade to the latest. Upgrading Zanata to use a higher version is a big effort as the API has changed considerably.

We also have the new editor in the pipeline, which could make use of newer libraries.

Neither of those options guarantees that the problem will be fixed, but we need to decide where we invest our efforts.

The workaround at the moment is to use the plain text editor.

Comment 22 Michelle Kim 2015-02-25 04:12:05 UTC
It happened to me when I translate Korean in Zanata as well. Even though for me it was just short translation that I could live with, I can understand how much this issue affects translators who work in Zanata on a daily basis.

Carlos & Patrick, is there any other way to fix this cursor issue other than CodeMirror Upgrade or switching to text mode?

Comment 23 croe@redhat.com 2015-02-25 05:55:49 UTC
I experienced this problem as well. My workaround solution was to put my cursor one or two characters ahead, or sometimes more :( to reach the place where you truly wish to be with the cursor and it happens with only a few random strings here and there (no pattern found by me). It happened today and last week to me while translating  JBoss EAP 6.3 Config & Admin Guide in fr-FR - browser used Firefox

Comment 24 Michelle Kim 2015-02-25 07:02:21 UTC
Thanks everyone for your comments. 

So far I identified several translators (yuko, corina, julie, hedda, kenzo etc) regularly experience this cursor issue randomly. 

I spoke to Carlos and it seems this issue is CodeMirror issue and one way to switching the CodeMirror to other syntax highlighting tool. We have beta version of new editor available shortly in 3.6 release (Due out by next week) with only minimum functionality. However I will try to make sure that this cursor or CodeMirror issue is no longer an issue with our new Editor.

Keep you updated and leaving this issue as high priority to see if we can still fix it in current editor.

Comment 25 Patrick Huang 2015-02-26 00:18:15 UTC
It's the library (codemirror) which does all this rendering and positioning of the cursor. I think I have raised this issues with codemirror in the past. They seem to only partially fixed it. Every time I put up an issue they will always suggest me to upgrade to newer version which is understandable. I guess we could try to upgrade codemirror and see if it works. 

There are some other issues with codemirror editor too like spellcheck. That's why it's no longer our default editor. For people who has issues with it, they can switch to plain text editor for now. No syntax highlighting but we do have validation options to help.

Comment 26 Michelle Kim 2015-03-17 00:32:24 UTC
Hi Yuko,

During our meeting with translators last week, we came to an agreement that codemirror issue is not something that Zanata team has total control over, so we are trying to create a new editor which will eliminate the current issues with codemirror.

In current editor, our suggestion is to have codemirror enabled in source (english), while making the text editor enabled by default in target. There is always an option to switch the syntax highlighting on using the setting or toggle key (ctrl + alt + h). However, due to the unstable nature of codemirror, the cursor issue will appear randomly. I understand this is not ideal, however since we have new editor release in near future, we decided to allocate more time and resource onto creating something better than fixing some issues that applies to current editor.

If you are happy with the solution, can you please close the bug or let me know if you have any other issues? Thanks

Comment 27 Yuko Katabami 2015-03-17 00:42:35 UTC
Hi Michelle,

Thank you for following up this.
I understand the circumstance and agree with you that the resource/time should be allocated to creating/implementing a better solution.
I wait for the new editor to completed.

In the meantime, I am using the workaround to switch off the syntax highlighting in my local setting.

Moving the status to CLOSED.