Yogesh Bhusara
All experiments

44 / FLOATING GEOMETRY

Contextual Menu Position

The problem

A context menu that always opens the same way spills off the edge when you click near a corner.

The solution

The menu opens at the pointer and flips to stay inside the viewport.

Experiment

Task: Right-click near different edges of the area.

NAIVE
Right-click anywhere (try the corners)
collisionnone
openFALSE
THOUGHTFUL
Right-click anywhere (try the corners)
collisionflip + shift
openFALSE

How it works

Seen in

Right-click menus

Actions open at the cursor and never spill off screen.

Canvas tools

Context actions appear where you clicked in the workspace.

File managers

Item menus flip near edges to stay fully visible.

Data grids

Cell menus position at the pointer and adjust for bounds.

References