Skip to content
This repository has been archived by the owner on Sep 27, 2024. It is now read-only.

Crash when adding a new line right after a mention #903

Closed
jmartinesp opened this issue Dec 13, 2023 · 0 comments · Fixed by #904
Closed

Crash when adding a new line right after a mention #903

jmartinesp opened this issue Dec 13, 2023 · 0 comments · Fixed by #904

Comments

@jmartinesp
Copy link
Contributor

Problem

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.

Related issues

Proposed solution

Fix the DOM tree splitting algorithm.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant