@mocanvas/editor · constant

MenuClickCapture

declare const MenuClickCapture: ({ onClose }: {
    onClose?: () => void;
}) => react.JSX.Element | null

A transparent sheet that swallows the click which closes an open menu.

Without it, the click that dismisses a dropdown also lands on the canvas and starts a selection or, worse, creates a shape. Mounted only while a menu is open, so it costs nothing the rest of the time.

mocanvas is built by Symbio. Free for non-commercial, non-profit and development use; commercial use needs an agreement. Not affiliated with or endorsed by tldraw.