Skip to content

Commit

Permalink
disable context menu on canvas
Browse files Browse the repository at this point in the history
  • Loading branch information
a-type committed Nov 11, 2024
1 parent bdfa913 commit 4cedc96
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion apps/palette/web/src/components/projects/ProjectCanvas.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ import { useSnapshot } from 'valtio';
import { Button } from '@a-type/ui/components/button';
import { Icon } from '@a-type/ui/components/icon';
import { toolState } from './state.js';
import { preventDefault } from '@a-type/utils';

export interface ProjectCanvasProps {
project: Project;
Expand Down Expand Up @@ -145,7 +146,7 @@ function ColorPickerCanvas({
}, [canvasRef]);

return (
<CanvasRoot canvas={logicalCanvas}>
<CanvasRoot canvas={logicalCanvas} onContextMenu={preventDefault}>
{/* <CanvasBackground> */}
<canvas ref={canvasRef} className={clsx('touch-none', className)} />
{/* </CanvasBackground> */}
Expand Down

0 comments on commit 4cedc96

Please sign in to comment.