MoonshotAI / MoonshotAI/kimi-code
fix(web): slash menu and mention menu do not close on click outside
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 7.5k
- Forks
- 1.2k
- Avg merge
- 11h 53m
- Merged PRs (30d)
- 350
Description
Bug description
In the Kimi Web composer, the slash menu (/) and @ mention menu only close when pressing Esc or selecting an item. Clicking outside the menu does not close it, which is inconsistent with standard UI behavior.
Reproduction steps
- Open Kimi Web (
kimi weborpnpm --filter kimi-web dev) - Open any session
- Click the composer input and type
/ - The slash menu appears
- Click on a neutral area outside the menu (e.g., the chat history area)
Expected behavior
The slash menu should close when clicking outside of it.
Actual behavior
The slash menu stays open. Only Esc or selecting a command closes it.
The same issue affects the @ mention menu.
Environment
- kimi-web version: latest main
- Browser: Chrome / Chromium / Safari
- OS: macOS
Additional context
The composer already uses a document click listener to close other dropdowns (e.g., the permission dropdown). The slash and mention menus should follow the same pattern.
I have a local fix and am happy to submit a PR if the team agrees with the direction.
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 in the Kimi Web composer and inspect the existing document click listener used for the permission dropdown. Trace how the slash and mention menus are opened and closed, then make their outside-click behavior match that pattern. Done means clicking a neutral area closes both menus while Esc and item selection still work.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- frontend, web-dev
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Quiet
- Clarity
- Clearly specified
- Newbie friendliness
- 72/100