[Menu] On Firefox, selection gets removed after a right-click on selected text to open the context menu
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 99.1k
- Forks
- 32.5k
- Avg merge
- 2d 17h
- Merged PRs (30d)
- 106
Description
Duplicates
- I have searched the existing issues
Latest version
- I have tested the latest version
Current behavior 😯
With Firefox [v102.0 (64-bit)] and Material UI's context menu combination, when I select the text and perform a right-click on the selected text, it triggers a context, but it just clears out the text selection. It is reproducible on the Material UI's official site as well.
Expected behavior 🤔
When I select the text and perform a right-click on the selected text, it should open the context menu keeping the user text selection as is.
Steps to reproduce 🕹
Steps:
- Open the Firefox browser.
- Go to the Material UI's official site that demonstrates context menu implementation.
- Select some random text and perform right click on it.

Context 🔦
I am trying to implement a context menu in my project which already has a material UI dependency.
Your environment 🌎
No response
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 issue in Firefox on the Material UI context-menu demo linked in the report, following the listed text-selection and right-click steps. Trace the context-menu implementation used by that demo and verify that opening the menu preserves the selected text while retaining the existing menu behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, react
- Domain
- frontend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100