Skip to content

spec(Popover): proposed: an outside pan or drag closes a light-dismiss Popover - #8432

Closed
cixzhang wants to merge 1 commit into
mainfrom
spec/popover-outside-pan-dismiss
Closed

cixzhang wants to merge 1 commit into
mainfrom
spec/popover-outside-pan-dismiss

Conversation

@cixzhang

Copy link
Copy Markdown
Contributor

Proposed; pending owner decision. This PR records a proposed rule for review; it is not approved.

Exact decision needed

Should a pan or drag that starts outside an open light-dismiss Popover close it, for mouse, pen, and touch alike?

Existing authority searched

  • component:Popover: outside light dismiss uses native popover="auto"; hasLightDismiss (default true) turns it off. No rule names pans or drags.
  • family:overlay-dismissal AV4: each member owns whether and how pointer, touch, or gesture interaction dismisses it.
  • spec:AST-003 FR7–FR13: outside interaction resolves against owner surfaces, associated triggers, and branches; the gesture that dismissed or opened a surface is claimed so it cannot reopen or re-close it.
  • spec:AST-017 FR1, FR3: a changed functional default is judged under FR1 and names the restoring option; FR59: touch work changes desktop behavior only for a defect or deliberate cross-device consistency, with desktop evidence.
  • Search terms: light dismiss, outside, pointerdown, pointercancel, pan, drag, scrollbar, text selection.
  • Overlapping open work: AST-094 (spec(AST-094): touch presentations feel native by default #8409) touch presentation; menus below.

Decision (proposed)

component:Popover FR9 and DEC-8, both marked proposed:

  • A pan or drag that starts outside an open light-dismiss Popover closes it, for mouse, pen, and touch.
  • The opening gesture, and a gesture that starts inside the Popover or on its associated trigger, never closes it under this rule (AST-003 FR11, FR12).
  • hasLightDismiss={false} keeps it open.
  • OQ1 records the decision and its options.

Who is affected

Today native popover="auto" closes on a press that both starts and ends outside (pointerup). A gesture the browser takes over for scrolling ends in pointercancel, so it does not close.

Input Today Proposed Impact
Touch A page pan leaves the Popover floating open over moved content A page pan closes it Matches native touch popovers; someone panning to read nearby content loses the Popover
Pen A pen pan that scrolls leaves it open; a pen drag that does not scroll closes on release Any outside pen drag closes it Same rule as touch
Mouse A text-selection drag outside closes on release; a scrollbar drag likely leaves it open (no page pointer events; to verify per browser) Both close it Someone dragging the page scrollbar with a Popover open loses it; desktop change is deliberate cross-device consistency (AST-017 FR59), so the implementation PR needs desktop before/after evidence

Migration

  • Changed released default of documented interaction, judged under AST-017 FR1: a valid scenario (a Popover that stays open while the page pans) must change configuration, so the change is [breaking] and ships in a declared minor. The Changeset names the old and new default.
  • Restoring option: hasLightDismiss={false}. It is blunt: it also stops tap-outside dismissal. A narrower option that keeps tap-outside dismissal would be new public API under AST-002; OQ1 lists it.

Menus (AST-094, #8409)

  • DropdownMenu is built on usePopover, so it follows FR9 unless its record decides otherwise.
  • ContextMenu closes on its own outside mousedown and uses popover="manual", so it does not inherit FR9; a touch pan does not reach it today. Adopting the rule is ContextMenu's own decision.
  • Press and drag-to-select (module:DropdownMenu/useMenuPress): a press that opens a menu and drags to a row starts on the trigger, and a ContextMenu long-press starts on the trigger area; both are the opening gesture, which FR9 never treats as outside. No conflict.

Rejected alternatives

  • Closing only for touch.

Claim scope and non-goals

Outside pan and drag dismissal for Popover only. Escape, platform close, focus loss, and menu-specific dismissal stay with their owners.

Writing rubric results

  • R1 narration: none.
  • R2 research in the record: none; the per-input analysis stays in this description.
  • R3 evidence naming a change: none; verification names test states.
  • R4 rejected alternatives over one line or outside a decision: none; one line inside DEC-8.
  • R5 pull request or issue references remaining: none.
  • R6 ruled open questions still listing options: none; OQ1 is unanswered and keeps its options.

Scope

  • This PR contains specification records only.
  • It records observable behavior and preserves equivalent internal implementations.
  • Any named internal mechanism is intentionally public, names its dependent caller/system, and explains why an equivalent implementation would not satisfy the contract.
  • Verification states the evidence layer and failure signal without prescribing CI job/workflow topology.
  • It records one intentional durable decision, not a rescue for a separable tagalong.
  • The canonical knowledge owner, affected current claims, and overlapping open work are named; any ownership collision is resolved or called out for human decision.
  • Adjacent API, visual, accessibility, composition, and implementation facts remain outside scope unless this exact decision depends on them.
  • Public text and artifacts contain no internal Meta context.

Validation

  • pnpm check:knowledge (CI lint)
  • Prettier
  • git diff --check

@vercel

vercel Bot commented Oct 25, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
astryx Building Building Preview Oct 25, 2026 5:29pm UTC

Request Review

@meta-cla meta-cla Bot added the CLA Signed This label is managed by the Meta Open Source bot. label Oct 25, 2026
@github-actions github-actions Bot added the needs:spec-owner-review Current knowledge records await owner approval label Oct 25, 2026
@astracat-bot

astracat-bot Bot commented Oct 25, 2026

Copy link
Copy Markdown

AI review status for this pull request.

Review status Updated
🔄 In progress (for maintainers only) Oct 25, 2026, 5:30 PM UTC

@cixzhang cixzhang closed this Oct 25, 2026
@cixzhang
cixzhang deleted the spec/popover-outside-pan-dismiss branch October 25, 2026 17:37

This branch was successfully deployed

1 active deployment
Preview — 4d8d673d Deployed Oct 25, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed This label is managed by the Meta Open Source bot. needs:spec-owner-review Current knowledge records await owner approval

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant