[eric] canvas: NOTHING drags in fullscreen (untileForDrag chokepoint + guards on app and window cards; exit is the pill, green dot, or Escape)

This commit is contained in:
ciregenz
2026-08-09 14:47:31 -07:00
parent f10591f07c
commit 4804e232d9
3 changed files with 6 additions and 0 deletions
@@ -85,6 +85,8 @@ const CanvasWindowCard: React.FC<CanvasWindowCardProps> = ({
const onHeaderPointerDown = useCallback((e: React.PointerEvent) => {
if (e.button !== 0) return;
// Fullscreen has no drag (macOS rule); same guard as AgentCard/BrowserCard.
if (tiling.zone === 'fullscreen') return;
const target = e.target as HTMLElement;
if (target.closest('[data-no-drag], button, [role="button"], input, textarea, select')) return;
e.preventDefault();
@@ -396,6 +396,8 @@ const DashboardViewCard: React.FC<Props> = ({
const handleDragPointerDown = useCallback((e: React.PointerEvent) => {
if (e.button !== 0) return;
// Fullscreen has no drag (macOS rule); same guard as AgentCard/BrowserCard.
if (tiling.zone === 'fullscreen') return;
e.preventDefault();
e.stopPropagation();
const cs = getCanvasState();
@@ -70,6 +70,8 @@ export function useCardTiling({ cardId, getCanvasState, commitPosition }: CardTi
}, [tiledFrame, dispatch, cardId]);
const untileForDrag = useCallback((clientX: number, clientY: number, preTileWidth: number): { x: number; y: number } | null => {
// Fullscreen never drag-untiles (macOS rule; also every card's own drag guard): exiting is the pill/green dot/Escape, never a stray header wiggle.
if (zone === 'fullscreen') return null;
const frame = tiledFrame();
if (!frame) return null;
const cam = getCanvasState();