Page MenuHomePhabricator

Cursor not moving past "ग्र" and other multiple code-unit grapheme clusters on left arrow key press
Closed, ResolvedPublic

Description

Steps to reproduce:

  1. Open any page
  2. Open VE
  3. Type (or copy-paste) ग्र
  4. Press left arrow key

What should happen:
Cursor should move to the left of the glyph

What happens:
Cursor stays there

System environment:
Win 7 X64 SP1
Google Chrome 28.0.1500.72 m

The problem arises regardless of what follows ग्र . I've tried with space, tab, the letter a, devanagari characters that do not combine with the glyph, like क, and devanagari characters that do combine with the glyph, such as ि to produce ग्रि and ी to produce ग्री

The problem doesn't seem to affect firefox 15.0.1.

In chrome, the problem doesn't arise in the link editing window, or when editing parameter of a template. It does, however, arise when editing a reference.


Version: unspecified
Severity: normal

Details

Reference
bz51846

Event Timeline

bzimport raised the priority of this task from to High.Nov 22 2014, 2:01 AM
bzimport set Reference to bz51846.

Update: Same problem seems to arise for any other letters followed by ् + र to form a combined glyph. Examples:भ्र श्र ष्र etc. It does not seem to arise when the glyph is not combined.

(In reply to comment #1)

Update: Same problem seems to arise for any other letters followed by ् + र
to
form a combined glyph. Examples:भ्र श्र ष्र etc. It does not seem to arise
when
the glyph is not combined.

Hi,

You are referring problem to windows system based inscript input system , ULS or any hindi devnagari input or any devnagari input including Marathi and Nepali ?

Regards

(In reply to comment #2)

Hi,

You are referring problem to windows system based inscript input system , ULS
or any hindi devnagari input or any devnagari input including Marathi and
Nepali ?

Regards

The problem is not with the input method. It is with moving around the cursor when using visual editor. So, for example, if any letter followed by ् + र already exists on the wiki and you try to edit the page with visual editor, you can move the cursor across it from left to right, but not from right to left.

As far as I understand the problem, it is specific to devanagari (not hindi), although I haven't specifically gone to mr or ne wikis to verify.

There's code to address this bug in the following patch, which is due to go live on mediawiki.org by 13 September 2013:

https://gerrit.wikimedia.org/r/#/c/82858/

It does not fix this completely, but it does make it possible to cursor left through the cluster with repeated consecutive keypresses.

(In reply to comment #4)

There's code to address this bug in the following patch, which is due to go
live on mediawiki.org by 13 September 2013:

https://gerrit.wikimedia.org/r/#/c/82858/

It does not fix this completely, but it does make it possible to cursor left
through the cluster with repeated consecutive keypresses.

System environment:
Win 7 X64 SP1
Google Chrome 29.0.1547.66 m

Tested this out at [1]. The cursor moves past the glyph on two left arrow keypresses.

I tried selecting the text with the left arrow keypresses. Then I copy-pasted the selected text into an external text editor. It seems the first keypress takes the cursor past र and the second past ग्
However, visually the caret seems to be unmoved after the first keypress (i.e it does not move past the glyph or into the glyph) and crosses the glyph after the second keypress.

The patch also introduces an unintended side-effect. Crossing the glyph from the left to the right on right arrow keypress also takes two keypresses now. Without the patch, this used to take only one right arrow keypress. This correct behaviour can be currently seen at hindi wikipedia, specifically tested at [2]

So the problem is partially fixed, but with side-effects.

[1]: https://www.mediawiki.org/wiki/User:Siddhartha_Ghai?veaction=edit
[2]: https://hi.wikipedia.org/wiki/%E0%A4%B8%E0%A4%A6%E0%A4%B8%E0%A5%8D%E0%A4%AF:Siddhartha_Ghai/sandbox?veaction=edit

System environment:
Win 7 X64 SP1
Google Chrome 29.0.1547.66 m

It seems similar behaviour (both with and without the patch) occurs when a letter is followed by ् + स regardless of whether the glyph appears joined or not.

To be clear, the same problem occurs with this cluster, and the patch works the same.

Results with the patch for all consonants, tested at [1]:
Glyph(s) -- Number of keystrokes needed (going either left to right or right to left)
क्स ख्स ग्स घ्स ङ्स च्स छ्स ज्स झ्स ञ्स ट्स ठ्स ड्स ढ्स ण्स त्स थ्स द्स ध्स न्स प्स फ्स ब्स भ्स म्स य्स र्स ल्स व्स श्स ष्स स्स ह्स -- 2

I have not tested the selection per key-press for these, but I expect the results would be same as those in Comment 5

Results without the patch, tested at [2]:
All of the clusters can be passed with one right arrow key press going from left to right. None can be passed going right to left on any number of left arrow key-presses.

[1]: https://www.mediawiki.org/wiki/User:Siddhartha_Ghai?veaction=edit
[2]: https://hi.wikipedia.org/wiki/%E0%A4%B8%E0%A4%A6%E0%A4%B8%E0%A5%8D%E0%A4%AF:Siddhartha_Ghai/sandbox?veaction=edit

Update:
System Environment:
Windows 7 X64 SP1
Google Chrome 29.0.1547.76 m

Tested at https://www.mediawiki.org/wiki/User:Siddhartha_Ghai?veaction=edit

न्स seems to now require three keystrokes. All the others listed in Comment 6 above along with ग्र भ्र श्र ष्र still require two keystrokes.

There's code in progress to fix this in gerrit 80689 which is currently a work-in-progress.

Change 80689 had a related patch set uploaded by Divec:
DONTMERGE:Revert model to use simple UTF-16 code units

https://gerrit.wikimedia.org/r/80689

Change 80689 merged by jenkins-bot:
Revert model to use simple UTF-16 code units

https://gerrit.wikimedia.org/r/80689

Has this been deployed? If it has, it hasn't fixed the problem. Please reopen if this has been deployed. Tried at both urls per comment 6.

Reopening

System Environment:
Windows 7 X64 SP1
Google Chrome 31.0.1650.63 m

Urls:
Same as in comment 6

Glyphs:
Same as in comment 0 , comment 1 and comment 6

What happens:
Crossing the glyphs now requires three keypresses going either left to right or right to left.

We'll have to investigate. Sorry this isn't fixed yet!

18:32 < Sid-G> Hi. Can someone confirm if the fix for https://bugzilla.wikimedia.org/show_bug.cgi?id=51846 has been deployed to the wmf cluster?

18:40 < mutante> Sid-G: hi
18:40 < mutante> i dont know much about ve but yes, it looks deployed

8:40 < mutante> checked one of those changed files on tin
18:41 < mutante> /php-1.23wmf6/extensions/VisualEditor/modules/ve/ce/ve.ce.Document.js
18:43 < mutante> Sid-G: and also confirmed on random app server, so not like somebody forgot to deploy
18:43 < mutante> if it doesnt work it should actually need an additional fix

18:45 < Sid-G> hmm, then i should reopen the bug
18:45 < mutante> yes
18:45 < mutante> please do

18:58 < Sid-G> mutante: reopened. Is there an irc chan for VE?

19:15 < legoktm> #mediawiki-visualeditor

Jdforrester-WMF renamed this task from VisualEditor: Cursor not moving past ग्र on left arrow key press to Cursor not moving past "ग्र" and other multiple code-unit grapheme clusters on left arrow key press.Dec 1 2014, 4:49 PM
Jdforrester-WMF set Security to None.
Jdforrester-WMF added a subscriber: santhosh.
Jdforrester-WMF lowered the priority of this task from High to Medium.Jan 9 2015, 10:55 PM

Seems to be fixed now, though probably needs to be tested extensively before closing.

Jdforrester-WMF claimed this task.

Have tested quite a lot and this seems fine.