Page MenuHomePhabricator

Wordbreak detection is faulty for selection starting just down-page of a single character
Closed, ResolvedPublic8 Estimated Story Points

Description

Steps to reproduce:

1.Open a page with VE
2.Place a cursor after a text like "sub-heading 1"
3.Open the link inspector

Observe that the character 1 is not getting selected and the link inspector is opening at the end of the line

Screen_Shot_2014-12-10_at_2.39.01_PM.png (198×367 px, 16 KB)

Event Timeline

Ryasmeen assigned this task to Esanders.
Ryasmeen raised the priority of this task from to Needs Triage.
Ryasmeen updated the task description. (Show Details)
Ryasmeen changed Security from none to None.
Ryasmeen added a subscriber: Ryasmeen.
Mooeypoo added a subscriber: Mooeypoo.

I spoke to David about this issue, there is definitely something off about how we account for word boundary and wordbreaks.

Jdforrester-WMF renamed this task from Placing the cursor at the end of a character and clicking on link inspector icon does not select that character to Wordbreak detection is faulty for selection starting just down-page of a single character.Jan 10 2015, 3:42 AM

The word break calculation is correct:

Subheading1

But our word expansion logic avoids wrapping single length ranges due to the following cases:

DoubleSpace

UnicodeJS change was released in v0.1.3, which is now in VisualEditor core master following https://gerrit.wikimedia.org/r/188729 – what's next?

Jdforrester-WMF raised the priority of this task from Medium to High.Mar 18 2015, 1:11 AM

Change 197661 had a related patch set uploaded (by Divec):
WIP: BREAKING CHANGE: Use unicode character class to calculate word expansions

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

Change 197661 merged by jenkins-bot:
[BREAKING CHANGE] Use Unicode character class to calculate word expansions

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

Verified the fix in Betalabs and test2