bug: emoji suggestions open for times like 12:00 and Enter inserts an emoji instead of sending

Open Beginner friendly
#1,431 4 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

@kafeelraza is already working on this.

Since Nov 21, 2026.

  • #1446 by @kafeelraza — open

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
76/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Active
Tech stack
javascript, react
Domain
frontend

Research direction

Start by reading useSearchEmoji and its current /:([a-zA-Z0-9_+-]*?)$/ match; compare it with the triggerAnywhere behavior in ComposerPopupProvider or useComposerBoxPopup. Done when colons in times and ratios do not open emoji suggestions, while :smi still works at the start, after a space, and on a new line.

Written by the indexing model from the issue text.

Description

Description:

The emoji suggestions open for any colon followed by two characters, including the colon inside a time or a ratio. While the list is open, Enter picks the highlighted emoji instead of sending the message, so a message like "meeting at 12:00" is changed to "meeting at 12💯 " and not sent.

useSearchEmoji matches /:([a-zA-Z0-9_+-]*?)$/, which does not check what comes before the colon. Rocket.Chat's own composer only opens the emoji popup when the colon starts the message or follows a space ((?:^|\s):, from triggerAnywhere in ComposerPopupProvider / useComposerBoxPopup).

Steps to reproduce:
  1. In the message box, type meeting at 12:00.
  2. The emoji list opens with 💯.
  3. Press Enter.
Expected behavior:

No emoji list opens for 12:00, and Enter sends "meeting at 12:00".

Actual behavior:

The list opens and Enter replaces :00 with 💯. The message box now contains "meeting at 12💯 " and nothing is sent. Other examples with the current emoji list: see you at 10:30 (🈯), ratio 16:10 (💯, 🔟), note:ok (10 suggestions).

I'd like to send a fix that requires the colon to be at the start of the message or after a space, as in Rocket.Chat. Typing :smi at the start, after a space, or on a new line keeps working.

Dominant language
JavaScript
Stars
171
Forks
421
Avg merge
3d 6h
Merged PRs (30d)
4

Getting set up

  • No Dockerfile or Docker Compose file
  • Has a pull request template
  • No contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from RocketChat/EmbeddedChat

All issues in RocketChat/EmbeddedChat

Similar issues

More JavaScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.