Page MenuHomePhabricator

Highlighting on word you are looking for looks broken
Closed, ResolvedPublic8 Estimated Story Points

Description

Originally on mw.org - screenshot.

  1. Open https://ko.wikipedia.org/wiki/2013년_터키_반정부_시위?action=edit
  2. Look for "Gezi"
  3. Proceed to examine the 8 occurrences.

The first 2 look just fine, but as you go on you notice the highlighting is not on the word "gezi" anymore, but closer to whatever comes after that.
I thought it had to do with the language, but it is actually the same thing in the English article. Starts OK, then after the initial results only the "ezi" part is highlighted, and by result 15 the highlight is entirely on the next word ("prot"est).
Browser looks irrelevant (tested with Chrome, Safari).

Event Timeline

Jdforrester-WMF set the point value for this task to 8.
Jdforrester-WMF moved this task from To Triage to TR3: Language support on the VisualEditor board.

By the way, this also affects in Visual Editor original one(Not source editor).

Bug.JPG (1×1 px, 540 KB)

I can reproduce this in Vivaldi, while Firefox works as expected.

Seems like this is a problem with the DM offsets returned by ve.dm.Document#findText, as opposed to a rendering position issue.

Turns out that in the document full of Korean, the problem is the Turkish characters. The capital I with a dot above gets converted to lower case for case insensitive search, but it doing so it changes length from 1 to 2 as it decomposes:

'İ'.length
1
'İ'.toLowerCase().length
2

Change 342016 had a related patch set uploaded (by Esanders):
[VisualEditor/VisualEditor] Use Intl.Collator for all searches if available

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

The above patch fixes the offset issue reported in all our supported browsers. IE9/10 users will still not be able to do certain case insensitive searches in Turkish, but if the browser doesn't have the API there's not much we can do.

Change 342016 merged by jenkins-bot:
[VisualEditor/VisualEditor] Use Intl.Collator for all searches if available

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

Change 342041 had a related patch set uploaded (by Jforrester):
[mediawiki/extensions/VisualEditor] Update VE core submodule to master (97d8db944)

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

Change 342041 merged by jenkins-bot:
[mediawiki/extensions/VisualEditor] Update VE core submodule to master (bc0001c53)

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

Closed as resolved: I've tested on my user sandbox, I'm terribly sorry to say that, still causes problem... Shall I request a new ticket?

This task is resolved, but the fix isn't deployed yet. You can see this by the comment above "ReleaseTaggerBot added a project: MW-1.29-release (WMF-deploy-2017-03-14_(1.29.0-wmf.16))." Now when you look at Special:Version of the wiki you are interested in (e.g. ko), you'll probably see that the version still is 1.29.0-wmf.15. https://wikitech.wikimedia.org/wiki/Deployments informs you about the planed deployments, in this case the fix should go live Thursday, March 16, 19:00–21:00 UTC.

This task is resolved, but the fix isn't deployed yet. You can see this by the comment above "ReleaseTaggerBot added a project: MW-1.29-release (WMF-deploy-2017-03-14_(1.29.0-wmf.16))." Now when you look at Special:Version of the wiki you are interested in (e.g. ko), you'll probably see that the version still is 1.29.0-wmf.15. https://wikitech.wikimedia.org/wiki/Deployments informs you about the planed deployments, in this case the fix should go live Thursday, March 16, 19:00–21:00 UTC.

Change 343321 had a related patch set uploaded (by Jforrester):
[mediawiki/extensions/VisualEditor] Update VE core submodule to master (a63435906)

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