Page MenuHomePhabricator

Inserting a combining diacritic mark into a VE surface messes up cursoring and causes duplicate text
Closed, DuplicatePublic

Description

Inserting a combining diacritic mark, such as U+0308 COMBINING DIAERESIS, into a VE surface messes up cursoring and causes duplicate text to appear. (Tested on Chrome.)

It's tricky to do it, but possible. There are at least two ways possible right now:

  • Copy and paste it. For example, you can copy the one below (try triple-clicking and Ctrl+C):

    ̈
  • Change the 'visualeditor-specialcharinspector-characterlist-insert' message so that it has combining marks in it, then use the "Special character" tool. For example:

    "visualeditor-specialcharinspector-characterlist-insert": "{\"Combining accents\":{\"a\u0308\":\"\u0308\",\"a\u0300\":\"\u0300\",\"a\u0303\":\"\u0303\",\"a\u030b\":\"\u030b\",\"a\u032d\":\"\u032d\"}}",
  • (I imagine there are some IMEs or keyboard layouts out there that let you type them at will, but I haven't seen one personally.)

All kinds of funny things happen with these characters, but for example:

  1. Open the empty.html demo
  2. Type "a"
  3. Insert a combining diacritic mark (using either method)
  4. Type "b"
    • Instead of just "b", "<paragraph>b</paragraph>" is inserted
    • In the CE surface, "b" is still on the same line, with an empty paragraph appearing underneath
  5. Press Enter
    • In the CE surface, "b" is duplicated

image.png (1,354×770 px, 90 KB)

By the way, you can't insert a combining diacritic mark as the first character on a line. This seems unexpected.