RocketChat / RocketChat/Rocket.Chat
Autocomplete highlights wrong search results when they appear under the cursor
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 46.1k
- Forks
- 13.9k
- Avg merge
- 3d 3h
- Merged PRs (30d)
- 130
Description
Description:
If the cursor is near the bottom of the channel window, when you @ search to autocomplete it will automatically and incorrectly highlight whatever happens to be under the cursor which is almost never what you intend.
Steps to reproduce:
- position your mouse cursor just above the message box
- type @ and optionally some search chars
- the autocomplete pops up in the same region as the mouse cursor
Expected behavior:
When you are typing the search autocomplete should appear under the cursor and the first item selected. The focused item should only be affected by keyboard navigation, ie key down to select a result to select it. If the mouse cursor is moved then, and only then, should that result in a highlight of an autocomplete item. If you then swap back to the keyboard and type more then the mouse position should be ignored again.
Actual behavior:
The item under the cursor is selected. If the cursor is positioned close to the bottom, and 5 records are shown in the popup, then it will select the 5th most useful result instead of defaulting to the 1st most useful result.
Server Setup Information:
- Version of Rocket.Chat Server: 0.73.2
- Operating System: linux 4.4.0-154-generic
- Deployment Method:
- Number of Running Instances:
- DB Replicaset Oplog:
- NodeJS Version:
- MongoDB Version:
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 autocomplete behavior in a channel near the bottom of the window, following the listed @-search steps with both mouse and keyboard input. Locate the autocomplete UI entry point responsible for hover selection and keyboard focus. Done means typing selects the first result, keyboard navigation changes selection, and mouse movement only affects the highlight after the pointer moves.
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
- 35/100