When adding a line break right after a mention, the composer crashes.
Steps to reproduce
Add a mention to the composer. This will also add a whitespace after it.
Remove the whitespace and place the cursor right after the mention.
Hit enter/add a line break.
The composer crashes. This happens because when adding a new line we're supposed to split the DOM tree in 2 and use paragraphs/line break nodes in between, but the code doesn't make an exception for mentions, which have only 1 char length.
Problem
When adding a line break right after a mention, the composer crashes.
Steps to reproduce
The composer crashes. This happens because when adding a new line we're supposed to split the DOM tree in 2 and use paragraphs/line break nodes in between, but the code doesn't make an exception for mentions, which have only 1 char length.
Related issues
Proposed solution
Fix the DOM tree splitting algorithm.