Skip to content

Commit

Permalink
Show menu only on Option+Right-click (#30)
Browse files Browse the repository at this point in the history
* Show menu only on Option+Right-click

* Create soft-adults-fail.md

Co-authored-by: Eric Clemmons <eric@smarterspam.com>
  • Loading branch information
frantic and ericclemmons authored Apr 27, 2022
1 parent 832254e commit 3ae6fcf
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
5 changes: 5 additions & 0 deletions .changeset/soft-adults-fail.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"click-to-react-component": patch
---

Show menu only on Option+Right-click
4 changes: 4 additions & 0 deletions packages/click-to-react-component/src/ContextMenu.js
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,10 @@ export const ContextMenu = React.forwardRef(
/** @type {MouseEvent} */
e
) {
if (!e.altKey) {
return
}

e.preventDefault()
mergedReferenceRef({
getBoundingClientRect() {
Expand Down

0 comments on commit 3ae6fcf

Please sign in to comment.