Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Disable default context menu on windows #608

Merged
merged 3 commits into from
Oct 11, 2024

Conversation

filip131311
Copy link
Collaborator

@filip131311 filip131311 commented Oct 10, 2024

This PR disables default context menu on windows, as it clashed with right-click inspector functionality.

Test plan:

  • open Radon IDE
  • right click inside app previe to trigger inspector

Copy link

vercel bot commented Oct 10, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
radon-ide ✅ Ready (Inspect) Visit Preview 💬 Add feedback Oct 11, 2024 1:44pm

@filip131311 filip131311 changed the title init Disable default context menu on windows Oct 10, 2024
Copy link
Member

@kmagiera kmagiera left a comment

Choose a reason for hiding this comment

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

Please add test plan to the PR description

return () => removeEventListener("blur", onBlurChange, true);
return () => {
window.removeEventListener("contextmenu", onContextMenu);
removeEventListener("blur", onBlurChange, true);
Copy link
Member

Choose a reason for hiding this comment

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

can we update removeEventListener here and also corresponding addEventLIstener call to specify whether it operates on document or window (or something else?)

@filip131311 filip131311 merged commit 79698cf into main Oct 11, 2024
3 checks passed
@filip131311 filip131311 deleted the @Filip131311/FixContextMenuOnWindows branch October 11, 2024 13:46
filip131311 added a commit that referenced this pull request Oct 18, 2024
This PR fixes the behavior of right click when using inspector tool, it
removes the old `ContexMenu` in favor of `DropdownMenu`, which is more
appropriate as it does not require `contextmenu` event to be activated,
which since #608 is disabled.

### How Has This Been Tested: 

- run any test application and use right click to inspect a component
- use inspector button and right click while it is active

---------

Co-authored-by: Paweł Małecki <92953623+p-malecki@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants