Skip to content

Commit

Permalink
fix(ui): prevent context menu in viewport (motion-canvas#123)
Browse files Browse the repository at this point in the history
  • Loading branch information
aarthificial authored Jan 7, 2023
1 parent 9a7899d commit 0fdd85e
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions packages/ui/src/components/viewport/View.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,9 @@ export function View() {
<div
className={styles.viewport}
ref={containerRef}
onContextMenu={event => {
event.preventDefault();
}}
onMouseDown={event => {
if (event.button === 0 && !event.shiftKey) {
if (!isInspectable(scene)) return;
Expand Down

0 comments on commit 0fdd85e

Please sign in to comment.