VisualEditor: Typing immediately after link introduces pawn (♙) if link is preceded by multibyte text
Closed, ResolvedPublic

Description

Seems to happen specifically in https://en.wikipedia.org/wiki/Jabhala?veaction=edit for no apparent reason; try it.


Version: unspecified
Severity: normal

bzimport set Reference to bz51140.
Ironholds created this task.Via LegacyJul 10 2013, 10:33 PM
bzimport added a comment.Via ConduitJul 10 2013, 11:13 PM

weskaggs wrote:

In case it may be helpful, the character produced is a white chess pawn, unicode 0x2659 (html &#9817). This character is produced if any character is added immediately after any of the three links in the first sentence, but not if a character is added after a link in the second sentence. If the Hindi text in the first sentence is deleted, then characters entered after a link produce the correct result.

Catrope added a comment.Via ConduitJul 10 2013, 11:15 PM

Turns out that it happens when inserting any character after the link, but only at the position immediately after the link (so the second character isn't pawned because there's something (the first pawn) between it and the link), and only if there is multibyte text in the same paragraph preceding the link.

The article's first and only paragraph starts with "Jabhala (Hindi:जभाला) is..." and so this bug affects every link on that article. But it doesn't affect any links before जभाला (there aren't any right now but you can create them), and if you use Enter to break the paragraph after the Hindi text, it doesn't affect any links in the second paragraph either.

Assigning to Ed because this is a multibyte issue.

bzimport added a comment.Via ConduitJul 10 2013, 11:36 PM

weskaggs wrote:

Further observations: the "pawn" has utf-8 hex code E2 99 99. The multibyte characters that provoke this behavior are either of:

devangiri letter LA, unicode 0x2354, utf-8 hex E0 A4 B2
devangiri letter BHA, unicode 0x2349, utf-8 hex E0 A4 AD

gerritbot added a comment.Via ConduitJul 15 2013, 10:00 PM

Change 73874 had a related patch set uploaded by Esanders:
Replace text strings with grapheme arrays in onContentChange

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

gerritbot added a comment.Via ConduitJul 15 2013, 10:10 PM

Change 73874 merged by jenkins-bot:
Replace text strings with grapheme arrays in onContentChange

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

Jdforrester-WMF added a comment.Via ConduitJul 15 2013, 10:10 PM

Fixed and merged.

Esanders added a comment.Via ConduitJul 15 2013, 10:45 PM
  • Bug 51112 has been marked as a duplicate of this bug. ***

Add Comment

Column Prototype
This is a very early prototype of a persistent column. It is not expected to work yet, and leaving it open will activate other new features which will break things. Press "\" (backslash) on your keyboard to close it now.