Skip to content
This repository was archived by the owner on Jan 11, 2023. It is now read-only.

Fix for #4469 Right-click in editor window shows 2 context menus#4470

Merged
bomsy merged 3 commits into
firefox-devtools:masterfrom
jainsneha23:bug-4469
Oct 23, 2017
Merged

Fix for #4469 Right-click in editor window shows 2 context menus#4470
bomsy merged 3 commits into
firefox-devtools:masterfrom
jainsneha23:bug-4469

Conversation

@jainsneha23

Copy link
Copy Markdown
Contributor

Associated Issue: #4469

Summary of Changes

  • Added event stopPropagation and prevent default to context menu event

Test Plan

  • open editor window
  • right click inside the text
  • 1 context menu appear (debugger)

Screenshots/Videos (OPTIONAL)

4469

Comment thread src/components/Editor/index.js Outdated
codeMirror.on("contextmenu", (cm, event) => {
event.stopPropagation();
event.preventDefault();
return this.openMenu(event);

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

minor point, but for aesthetics can we move event.stopPropagation and event.preventDefault to openMenu. It'll only ever be called here

@jainsneha23

Copy link
Copy Markdown
Contributor Author

There is one more bug here.
right click -> context menu appears -> right click on a different point
there will be 2 context menu - one debugger , and other browser

Seems like codemirror issue

screen shot 2017-10-23 at 10 13 07 pm

@jasonLaster

Copy link
Copy Markdown
Contributor

we can ignore the 2nd issue.. it's only true in the launchpad

@bomsy bomsy left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@bomsy
bomsy merged commit feab364 into firefox-devtools:master Oct 23, 2017
@jainsneha23
jainsneha23 deleted the bug-4469 branch October 24, 2017 02:36
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants