-
Notifications
You must be signed in to change notification settings - Fork 35
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
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
There was a problem hiding this 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); |
There was a problem hiding this comment.
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?)
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>
This PR disables default context menu on windows, as it clashed with right-click inspector functionality.
Test plan: