RocketChat / RocketChat/Rocket.Chat

[bug] : Custom category is not highlighted in the emoji picker header

Open
#42,133 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

type: bug
Dominant language
TypeScript
Stars
46.1k
Forks
13.9k
Avg merge
3d 3h
Merged PRs (30d)
130

Description

Description:

In message composer's emoji picker , the last category (Custom) is never highlighted in the category header. Clicking the Custom icon or scrolling down to the Custom section ,shows the correct emoji but leaves the previous category (Flags) highlighted in the header.

Steps to reproduce:
  1. Add at least one custom emoji from Admin -> Emoji
  2. Open any channel and click the emoji icon in the message composer
  3. Click the last icon in the composer in the category header (Custom)
  4. Look at the category header
What you expect to happen

The Custom icon is highlighted while the Custom section is in view.

Actual behavior:

The Custom section is displayed but the flag icon stays highlighted.
The Custom icon never becomes active.

https://github.com/user-attachments/assets/70256f0e-6a0c-48f2-aec3-f21c3d94c5ed

Server Setup Information:
  • Version of Rocket.Chat Server: 8.9.0-develop
  • License Type: Starter
  • Number of Users: 1
  • Operating System: Linux
  • Deployment Method: source
  • Number of Running Instances: 1
  • DB Replicaset Oplog: disabled
  • NodeJS Version: v24.15.0
  • MongoDB Version: 7.0.16
Client Setup Information

Desktop App or Browser version : Chrome 151.0.7922.174 (Official Build) (64-bit) (cohort: Stable) , also reproduced in the Rocket.Chat Desktop app 4.16.0

  • Operating System: Windows 11
Additional context

The category highlighted is set in 'handleScroll' in 'app/meteor/client/views/composer/EmojiPicker.tsx' , based on the index of the first visible row. When the last category's content is shorter than the viewport , that index can never reach it , so the previous category stays selected .Clicking the icon only scrolls the list so it hits the same path.

I have a fix working locally and will open a PR.

Relevant logs:

Lint with no error

Contributor guide

Open the 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.

Research direction

Start in app/meteor/client/views/composer/EmojiPicker.tsx, especially handleScroll and the category-header selection logic. Reproduce the issue with a custom emoji, then inspect how the first visible row is mapped to a category when the Custom section is shorter than the viewport. Done means the Custom icon remains highlighted when its section is selected or visible.

Written by the indexing model from the issue text.

Assessment

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.