Skip to content

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

Open

Description

@arshil42

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.

Activity

  1. Sarala-932 commented on Nov 19, 2026

    @Sarala-932

    Hey @arshil42 , just checking in are you currently working on a PR for this? If not, I'd be happy to take it up!

  2. kafeelraza commented on Nov 21, 2026

    @kafeelraza

    Hey @arshil42 @Sarala-932, just checking in — is anyone currently working on a PR for this? If not, I would love to take this up and open a PR with the fix!

  3. arshil42 commented on Nov 22, 2026

    @arshil42
    Author

    @Sarala-932 @kafeelraza sorry for the slow reply. I'm not working on a fix for this, so please go ahead: kafeelraza has already opened #1446 for it. Thanks both for picking it up.

  4. kafeelraza commented on Nov 22, 2026

    @kafeelraza

    Thanks a lot @arshil42! I've linked PR #1446 with the tested fix and changeset. Looking forward to review and feedback from the maintainers! 🙌

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions