fix(realtime composer): mentions, channels and emojis not working after @all / @here
Changes requested
MA
15d ago+28+28+01234567890123456789-2-2-0123456789
Proposed changes (including videos or screenshots)
In the realtime composer, typing a space right after a mention (@all, @here, @user, #channel) inserted a non-breaking space instead of a regular one. Because of that:
- the user, channel and emoji autocomplete didn't open for the next word
- the next mention was rendered as plain text, in the composer and in the sent message
The composer now treats non-breaking spaces as regular spaces when it parses and reads its text, so whatever follows a mention works the same as anywhere else.
Issue(s)
Steps to test or reproduce
- Enable the realtime composer (Feature preview).
- Open a room and type
@all @(or@here @). - The user autocomplete should open. Pick a user. It should render as a mention.
- Repeat with
@all #and@all :smi. The channel and emoji autocomplete should open. - Send
@here @someuser. Both mentions should render in the message.
Before this fix, steps 3–5 showed no autocomplete, and the second mention rendered as plain text.
Summary by CodeRabbit
- Bug Fixes
- Nonbreaking spaces in message text are now treated as regular spaces, allowing adjacent mentions to be recognized separately.