outline / rich-markdown-editor

The open source React and Prosemirror based markdown editor that powers Outline. Want to try it out? Create an account:
https://www.getoutline.com
BSD 3-Clause "New" or "Revised" License
2.87k stars 592 forks source link

Codeblock adds additional characters #447

Closed Valiantiam closed 3 years ago

Valiantiam commented 3 years ago

When you delete a character on a codeblock fresh line, it adds that character to the end of the line repeatedly for each additional character you type.

To Reproduce Steps to reproduce the behavior:

  1. Make a codeblock
  2. Type a single character on its own line.
  3. Backspace and replace it with a different letter.
  4. It now starts putting copies of the original letter on that line for every character you type.

Expected behavior It should not add additional characters.

Screenshots CodeblockProblem

Desktop (please complete the following information):

tommoor commented 3 years ago

wild, It's something to do with the decorations introduced by the Prism plugin – disabling highlighting on the block causes the bug not to reproduce.