Uploaded image for project: 'Minecraft: Java Edition'
  1. Minecraft: Java Edition
  2. MC-181539

Legacy formatting symbol in book misplaces cursor


    • Icon: Bug Bug
    • Resolution: Unresolved
    • None
    • 1.15.2, 20w18a, 1.16 Pre-release 2, 21w03a
    • None
    • Confirmed
    • UI

      Books containing the formatting character '§' make the client mismatch the actual character length/text position when clicking the text or moving the cursor using the arrow keys.

      Use the following command to reproduce the issue:

      /setblock ~ ~ ~ oak_sign{Text1:"{\"text\":\"Click me\",\"clickEvent\":{\"action\":\"run_command\",\"value\":\"/give @p writable_book{pages:[\\\"\\u00a7nVery cool text\\n\\u00a7r \\u00a7\\u00a7\\u00a7\\u00a7 hi\\n\\u00a75more\\n\\u00a7etext\\\"]}\"}}"}

      (This can also be reproduced without extra commands by having a book with the formatting character in a 1.13 world by copy-pasting text into it, and upgrading/opening that world with a 1.14+ client.)

      See attached screenshot: clicking text after a formatting symbol misplaces the cursor a few characters before the click position. Moving the cursor with the arrow keys requires multiple presses to go past the formatting character (see also MC-181673).

            Unassigned Unassigned
            KennyTV Nassim Jahnke
            4 Vote for this issue
            3 Start watching this issue