mui / mui/material-ui

[Menu] On Firefox, selection gets removed after a right-click on selected text to open the context menu

Open
#33,644 3 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

docs external dependency scope: menu
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:

  1. Open the Firefox browser.
  2. Go to the Material UI's official site that demonstrates context menu implementation.
  3. Select some random text and perform right click on it.

firefox-context-menu

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

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 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.