RocketChat / RocketChat/Rocket.Chat
In the chat textbox, when the text wraps to the next line after spaces, the cursor appears far away from the text.
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 46.1k
- Forks
- 13.9k
- Avg merge
- 3d 3h
- Merged PRs (30d)
- 130
Description
Description:
In the chat input box, the cursor becomes misaligned when typing a long message that wraps to the next line. While typing normally everything appears correct, but when spaces are added in the sentence and the text automatically moves to the next line, the cursor position becomes incorrect. The text itself remains properly aligned, but the cursor appears far away from the actual typing position. As a result, the caret does not visually match where the characters are being inserted, which makes typing confusing for the user. This issue seems to occur specifically when the line wraps after spaces in the sentence.
Steps to reproduce:
- Go to chat box
- type any sentence with space until the text goes to new line automatically
- then this issue occurs
Expected behavior:
What you expect to happen
The cursor should remain aligned with the text while typing. When the text wraps to the next line (including after spaces), the cursor should move to the correct position at the end of the text and stay visually aligned with the characters being typed.
Actual behavior:
When the text wraps to the next line after spaces, the cursor becomes misaligned and appears far away from the text position. The text remains correctly aligned, but the cursor does not stay at the end of the typed content.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the issue in the chat input with a long sentence that wraps after spaces, then trace the chat textbox implementation and its caret or wrapping behavior. Done means the cursor remains visually aligned with the inserted text after automatic line wrapping, including when wrapping follows spaces, and the behavior is covered by an appropriate test.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- frontend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100