Last modified: 2013-11-26 23:02:52 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T53596, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 51596 - VisualEditor: Cannot move cursor backwards on ligature cluster on Chrome
VisualEditor: Cannot move cursor backwards on ligature cluster on Chrome
Status: RESOLVED FIXED
Product: VisualEditor
Classification: Unclassified
Language (Other open bugs)
unspecified
All All
: High normal
: VE-deploy-2013-12-05
Assigned To: D Chan
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2013-07-18 06:17 UTC by Santhosh Thottingal
Modified: 2013-11-26 23:02 UTC (History)
8 users (show)

See Also:
Web browser: Google Chrome
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description Santhosh Thottingal 2013-07-18 06:17:52 UTC
Browser: Chrome any version.

1. Open VE
2. Type or copy-paste സന്തോഷ്
3. Move the cursor to the end of that word.
4. Press left arrow to move the caret backwards.
5. In the second keypress onwards cursor is stuck.(like സന്തോ|ഷ് )

Expected: cursor keep moving to left. 

Observed. cursor stuck.
Comment 1 Santhosh Thottingal 2013-07-18 06:29:31 UTC
Debug Information:

Grapheme breaks as per unicodejs:
0: "സ"
1: "ന്"
2: "തോ"
3: "ഷ്"

Ligature break 1 and 2 logically wrong because they form a single cluster ന്തോ. You cannot place a cursor in between this cluster. It is a single syllable too. Firefox allows you to place the cursor at all of these breaks anyway. Infact Firefox allows you to place the cursor even inside ligature programatically. Chrome allows cursor positioning only at logical positions.

In this specific case. VE is asking Chrome to place the cursor at end of  grapheme break #1(ന്). but Chrome does not obey it and place it at the end of #2 (തോ). This repeats in every left cursor movement and it looks like cursor is stuck at the end of തോ.

In my quick observation those logical positions does not match with the grapheme cluster boundary specification of Unicode (www.unicode.org/reports/tr29/#Grapheme_Cluster_Boundaries).

That causes lot of inconstancy in the offset known to the data model of VE and the actual offset appearing in browser. It will lead to many unexpected behavior of cursor positioning and text selections.
Comment 2 D Chan 2013-09-11 23:48:46 UTC
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.
Comment 3 James Forrester 2013-10-08 21:55:07 UTC
There's code in progress to fix this in Gerrit change #80689 which is currently a work-in-progress.
Comment 4 Gerrit Notification Bot 2013-11-20 11:29:28 UTC
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
Comment 5 Gerrit Notification Bot 2013-11-26 22:53:08 UTC
Change 80689 merged by jenkins-bot:
Revert model to use simple UTF-16 code units

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

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


Navigation
Links