Skip to content

fix(useMenuPress): hit-test in the menu's own shadow root - #7914

Merged
cixzhang merged 4 commits into
mainfrom
fix/menu-press-shadow-root
Oct 22, 2026
Merged

cixzhang merged 4 commits into
mainfrom
fix/menu-press-shadow-root

Conversation

@cixzhang

@cixzhang cixzhang commented Oct 22, 2026 •

Copy link
Copy Markdown
Contributor

User impact

When an app renders Astryx inside a shadow root (for example a notebook or a widget host that isolates each widget that way), clicking an option in a Selector, DropdownMenu or ContextMenu closes the list without selecting it. Mouse users cannot pick an option; keyboard selection still works.

Problem and solution fit

  • Why it happens: useMenuPress finds the element under the released pointer with document.elementFromPoint. For a point inside a shadow root, the document answers with the shadow host, not the option. The release then looks like it landed outside the menu, so the menu dismisses instead of activating the row.
  • Why it harms: the person's click does the opposite of what they asked, closing the list and losing the choice.
  • Why that matters: it breaks every pointer selection in these three components wherever they are hosted in a shadow root.

The hit test now runs on the menu's own root node when that is a shadow root (ShadowRoot implements elementFromPoint). Outside a shadow root getRootNode() is the document, so behavior there is unchanged.

Expected behavior and authority

Smallest restoration

  • useMenuPress.ts: resolvePoint calls elementFromPoint on the menu's root node when it is a shadow root, and on the document otherwise. The hitTest seam and the jsdom fallback are unchanged; the seam's doc comment states the new default.
  • ContextMenu.tsx: its own outside-press check (a document mousedown listener) read e.target, which the document sees as an outer shadow host. It closed the menu on mouse-down before the release could act.
    • When the menu sits in a shadow root (open, closed or nested), a listener on that root judges presses inside its tree first and marks them.
    • The document listener judges only presses no root has judged. Each press is judged once, and a press anywhere outside the menu still closes it, including a press on the shadow host itself.
    • Outside a shadow root nothing changes.

Evidence

  • Reproduction before the change: in real Chrome, a Selector rendered in an open shadow root (the new a11y/Menu press in a shadow root story): open it and click "Banana" with the mouse. The list closes and the value stays empty (3/3 runs).
  • Result after the change: the same click selects "Banana" (3/3 runs).
  • Representative unchanged path: all Selector, DropdownMenu, ContextMenu and useMenuPress suites pass unchanged (18 files, 646 tests). Outside a shadow root the root node is the document.
  • Regression tests, each failing on main:
    • MenuPressShadowRoot.a11y.chromium.spec.ts (real Chromium, real mouse), run in the pr-a11y job.
    • A useMenuPress.test.tsx case where the document answers with the shadow host and only the shadow root knows the row.
    • ContextMenu.test.tsx cases for an open, a closed and a nested shadow root: a press on a menu item does not close the menu, and a press on the host does.

Scope

  • One defect is restored.
  • Separable contradictory or unsettled tagalongs were removed or split.
  • No new public API, visual representation, default, or interaction model is hidden under the bug-fix label.
  • Public text and artifacts contain no internal Meta context.

Testing

  • pnpm exec vitest run --project ui packages/core/src/hooks/useMenuPress.test.tsx packages/core/src/Selector packages/core/src/DropdownMenu packages/core/src/ContextMenu: 646 tests pass. The new case fails against main's useMenuPress.ts.
  • Playwright Chromium against built Storybooks of this branch and of main's useMenuPress.ts: passes 3/3 here, fails 3/3 on main.
  • pnpm -F @astryxdesign/core typecheck, strict ESLint, Prettier, pnpm check:changesets: pass.

Fixes #7908

Inside a shadow root document.elementFromPoint answers with the shadow
host, so a released pointer over a Selector, DropdownMenu or ContextMenu row
resolved to a point outside the menu: the click closed the menu and selected
nothing (module:DropdownMenu/useMenuPress FR1). The hit test now runs on the
menu's root node when that is a shadow root, and on the document otherwise.
@vercel

vercel Bot commented Oct 22, 2026 •

Copy link
Copy Markdown

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

Project Deployment Actions Updated
astryx Ready Ready Preview Oct 22, 2026 3:47pm UTC

Request Review

@meta-cla meta-cla Bot added the CLA Signed This label is managed by the Meta Open Source bot. label Oct 22, 2026
@astracat-bot

astracat-bot Bot commented Oct 22, 2026 •

Copy link
Copy Markdown
Contributor

AI review status for this pull request.

Review status Updated
🟢 Reviewed (for maintainers only) Oct 22, 2026, 4:21 PM UTC

@github-actions

github-actions Bot commented Oct 22, 2026 •

Copy link
Copy Markdown
Contributor

PR Analysis Report

📚 Storybook Preview

View Storybook for this PR

🧪 Sandbox Preview

View Sandbox for this PR

Modified Components

ContextMenu (@astryxdesign/core) · View in Storybook
Metric Before After Delta
Bundle Size (ESM) N/A N/A N/A
Lines of Code N/A 639 -
Complexity N/A Very High (84) -

Bundle Size Summary

Package Size (ESM) Size (CJS) Gzipped
@astryxdesign/core N/A 4.9KB 1.2KB

Accessibility Audit

Status: No accessibility violations detected.

Visual Regression

46 of 490 shot(s) changed.

A change here is a question, not a failure: check whether the after is the
picture you intended. Record that review on the PR. Baseline maintenance is an
explicit dispatch of CI; this report never rewrites the baseline or adds a release gate.

component story theme mode pixels
Selector Indicator Space Bottom Sheet Narrow End RTL neutral light 753,933
Selector Indicator Space Bottom Sheet Wide Start neutral light 740,072
Chat Full AI Chat probe light 230,823
Chat Full AI Chat probe dark 229,805
RichTextEditor Markdown parity: side by side probe dark 94,866
RichTextEditor Markdown parity: side by side probe light 89,762
Collapsible Dividers probe dark 66,445
Collapsible Dividers probe light 66,445
Chat Default neutral dark 36,304
Chat Default neutral light 35,767
Chat Empty State probe light 23,531
Chat Empty State probe dark 22,622
ChatAutoScroll Scroll Behavior Comparison neutral dark 15,378
ChatAutoScroll Scroll Behavior Comparison neutral light 14,107
Chat With Attachments probe light 13,406
Chat With Attachments probe dark 11,232
ProgressBar With Target Mark probe dark 7,895
ProgressBar With Target Mark probe light 7,895
Markdown Default neutral dark 7,573
Markdown Default neutral light 7,566

and 26 more.


Generated by PR Enrichment workflow | Storybook | Sandbox | View full report

@astracat-bot astracat-bot Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for tracking this down: hit-testing in the menu's own shadow root restores mouse picks in Selector and DropdownMenu inside a shadow root, but a few things need to change before this can land.

  • ContextMenu inside a shadow root still closes without running the clicked item, because its own document mousedown outside-click handler in ContextMenu.tsx compares menu.contains(e.target) against the retargeted shadow host; checking e.composedPath().includes(menu) fixes it, or the changeset and Fixes #7908 should stop claiming ContextMenu.
  • The new story fails the Storybook typecheck (TS2322 at MenuPressShadowRootA11y.stories.tsx:35, a nullable value without hasClear), which turns the typecheck and build checks red; useState<string>() with onChange(next) compiles.
  • The new useMenuPress.test.tsx case should restore document.elementFromPoint in a finally, so a regression fails one test instead of fourteen.

[Automated review]

Comment thread .changeset/menu-press-shadow-root.md Outdated
'@astryxdesign/core': patch
---

[fix] Selector, DropdownMenu and ContextMenu: clicking an option inside a shadow root selects it. The menu used to hit-test through the document, which answers with the shadow host, so the click closed the menu without selecting anything.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ContextMenu is not fixed by this change. Its outside-click effect in packages/core/src/ContextMenu/ContextMenu.tsx (lines 465-479) closes the menu on any document mousedown where !menu.contains(e.target), and inside a shadow root that target is the shadow host, so the menu closes on mouse-down before useMenuPress sees the release. Checking the composed path makes the click act:

if (menu && !e.composedPath().includes(menu)) {
  closeMenu();
}

Otherwise, drop ContextMenu from this note and avoid closing #7908, which names it.

Comment on lines +33 to +35
const [value, setValue] = useState<string | null>(null);
return (
<Selector

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This fails the Storybook typecheck (TS2322 at line 35): without hasClear, Selector takes value?: string and onChange?: (value: string) => void, so a string | null state does not fit, and CI's typecheck and build checks fail. This compiles:

const [value, setValue] = useState<string>();
// ...
onChange={next => {
  setValue(next);
  onChange(next);
}}

Comment on lines +160 to +168
Object.assign(document, {elementFromPoint: () => host});
Object.assign(shadow, {elementFromPoint: () => inShadow('C')});
const events = {...mouse(), composed: true, bubbles: true};
fireEvent.pointerDown(inShadow('A'), events);
fireEvent.pointerUp(inShadow('A'), events);
expect(onSelect).toHaveBeenCalledWith('C');
expect(onSelect).toHaveBeenCalledTimes(1);
delete (document as {elementFromPoint?: unknown}).elementFromPoint;
host.remove();

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The stub on document is removed only when both assertions pass. Against the base hook this file then reports 14 failures, 13 of them later cases that inherit the stub; with the cleanup in finally it reports only this one:

Object.assign(document, {elementFromPoint: () => host});
Object.assign(shadow, {elementFromPoint: () => inShadow('C')});
try {
  // pointerDown, pointerUp and the two expectations
} finally {
  delete (document as {elementFromPoint?: unknown}).elementFromPoint;
  host.remove();
}

…lose it

ContextMenu's outside-press check read the event target, which the document
sees as the shadow host, so it closed the menu on mouse-down before the
release could act. It now checks the composed path. Also fixes the shadow-root
story's Selector types and makes the unit stub clean up on failure.

@astracat-bot astracat-bot Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the follow-up: hit-testing in the menu's own root and the composed-path check restore mouse picks in Selector, DropdownMenu and ContextMenu inside an open shadow root, and in Selector and DropdownMenu inside a closed one, but one gap remains before this can land. Inside a closed shadow root ContextMenu still closes on mouse-down without running the clicked item, because e.composedPath() read by a listener on document leaves out every node of a closed tree (ContextMenu.tsx:473), while the changeset says a click inside a shadow root now selects in all three menus. Judging the press in the menu's own tree (for example, also listening on menu.getRootNode() when it is a ShadowRoot and skipping document presses whose composed path includes its host) covers both modes; otherwise, narrow the changeset's ContextMenu claim to open shadow roots.

[Automated review]

if (menu && !menu.contains(e.target as Node)) {
// The composed path, not the target: inside a shadow root the document
// sees the shadow host as the target of a press on the menu.
if (menu && !e.composedPath().includes(menu)) {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Inside a closed shadow root this still closes the menu on mouse-down: composedPath() read by a listener on document leaves out every node of a closed tree, so it never includes menu, and the clicked item never runs. Selector and DropdownMenu work in the same closed root through getRootNode(). Judging the press in the menu's own tree covers both modes, for example:

const menuRoot = listRef.current?.getRootNode();
const shadowRoot = menuRoot instanceof ShadowRoot ? menuRoot : null;
const handleClickOutside = (e: Event) => {
  const menu = listRef.current;
  if (menu == null) {
    return;
  }
  // A press inside the menu's shadow root is judged by the root's own
  // listener, which sees the real path.
  if (
    shadowRoot != null &&
    e.currentTarget === document &&
    e.composedPath().includes(shadowRoot.host)
  ) {
    return;
  }
  if (!e.composedPath().includes(menu)) {
    closeMenu();
  }
};
document.addEventListener('mousedown', handleClickOutside);
shadowRoot?.addEventListener('mousedown', handleClickOutside);

with the matching removals in cleanup; otherwise the changeset's ContextMenu claim should say open shadow roots.

… root

A document listener's composed path leaves out a closed shadow tree, so a
press on a ContextMenu inside one still closed it. Presses in the menu's own
shadow tree are now judged by a listener on that root; the document listener
ignores presses retargeted to its shadow host. A press elsewhere in the same
tree still closes the menu. Tests cover open and closed roots.

@astracat-bot astracat-bot Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the update: hit-testing in the menu's own root now fixes mouse picks in Selector and DropdownMenu inside a shadow root, and the new root-level listener fixes ContextMenu in a single open or closed shadow root. Two ContextMenu cases still need a change before this can land, both from the host guard at ContextMenu.tsx:476:

  • A mouse press on the shadow host's own box (its padding or border) no longer closes an open ContextMenu, which it did before this change.
  • In a shadow root nested inside another, a press on a row still closes the menu without running it, although the changeset says clicks inside any shadow root now work.

Having the root's listener mark the event it judged, and the document listener skip that same event instead of comparing the target with the host, fixes both; a test for each would keep them fixed, and the PR description still describes the earlier composedPath() check.

[Automated review]

const shadow = tree instanceof ShadowRoot ? tree : null;
const handleClickOutside = (e: Event) => {
const menu = listRef.current;
if (e.currentTarget === document && e.target === shadow?.host) {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This guard skips every document press whose target is the menu root's host, which misses two cases:

  • A press on the host's own box (its padding or border) never passes through the shadow root, so neither listener closes the menu; before this change it closed.
  • In a shadow root nested inside another, the document sees the outermost host, not shadow.host, so a press on a row still closes the menu on mouse-down and the row never acts.

Judging each press once covers both: let the root's listener mark the event, and have the document listener skip that same event.

let judgedInTree: Event | null = null;
const judge = (e: Event) => {
  const menu = listRef.current;
  if (menu && !menu.contains(e.target as Node)) {
    closeMenu();
  }
};
const handleTreePress = (e: Event) => {
  judgedInTree = e;
  judge(e);
};
const handleClickOutside = (e: Event) => {
  if (e === judgedInTree) {
    return;
  }
  judge(e);
};
document.addEventListener('mousedown', handleClickOutside);
shadow?.addEventListener('mousedown', handleTreePress);

with the matching removals in cleanup.

expect(HTMLElement.prototype.hidePopover).toHaveBeenCalled();
});

it.each(['open', 'closed'] as const)(

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These cases cover a press on a row only. A case that presses the shadow host itself (fireEvent.mouseDown(host), expecting hidePopover to be called) and one that renders the menu in a shadow root nested inside another (expecting a row press to keep it open) would cover the two paths the host guard gets wrong.

The shadow-host guard kept a press on the host itself from closing the menu,
and a menu in a shadow root nested in another still closed on mouse-down.
The menu's own shadow root now judges presses inside its tree and marks
them; the document listener judges only presses no root has judged. Tests
cover open, closed and nested roots and a press on the host.

@astracat-bot astracat-bot Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the fix: hit-testing in the menu's own shadow root, and judging each ContextMenu press once from the innermost tree, make mouse clicks and finger taps act in Selector, DropdownMenu and ContextMenu inside open, closed and nested shadow roots, while a press outside the menu, including on the shadow host, still closes ContextMenu. The points raised on earlier revisions are all addressed, the new tests fail without the fix and pass with it, and this looks ready to merge. One optional note: the description mentions only mouse users, but finger taps on menu rows inside a shadow root were broken the same way and are fixed by this change too.

[Automated review]

@cixzhang
cixzhang merged commit 97dda3c into main Oct 22, 2026
68 checks passed
@cixzhang
cixzhang deleted the fix/menu-press-shadow-root branch October 22, 2026 16:23
cixzhang pushed a commit that referenced this pull request Oct 25, 2026
… it (#7308)

## User impact

On a phone, a `ContextMenu` a long press opens closes at once: as the finger lifts, Chromium sends the held element a compatibility `mousedown`, read as a press outside.

## Problem and solution fit

- Why it occurs: the menu closes on any document `mousedown` outside it, and a touch's compatibility events target the held trigger.
- Why it harms: no touch path.
- Why it matters: iOS opens one only by a long press.

## Expected behavior and authority

`spec:AST-094` (current) FR33: with a finger or pen, "the long press that opens a ContextMenu MUST NOT close it at the lift". `component:ContextMenu` FR5 routes the long-press lift there, and `architecture:interaction-modality` (current) INV4 asks for an operable path per modality. This PR implements that clause only; FR33's outside press (FR32), lift and handoff stay with their own work, and it changes no record row. #7303 proposes FR10 (focus on open); #7840, FR12. Overlap search over open PRs and records (`component:ContextMenu`, `layer-runtime.md`; "outside press", "long press", "compatibility"): #7303 and #7840 touch the same listener.

## Smallest restoration

`main`'s outside `mousedown` listener stays, shadow-root handling included. It skips the compatibility mouse events of the finger press that opened the menu: the long press, or a touch `contextmenu` where Chromium sends one, recorded by the shared gesture counter (`Layer/gestureCounter`), which advances on every `pointerdown` and `keydown`. Any later press is a new gesture, so every other outside press keeps its outcome: a mouse or pen closes at the press, a tap on its compatibility `mousedown`, while a scroll, a cancelled or stopped `pointerdown`, an unpanned drag or a second finger leaves it open. A mouse or keyboard open records no gesture. No listener, API or default is added; `architecture:layer-runtime` names the skip.

## Evidence

- Before, in real Chromium (CDP touch): the menu opens at about 510 ms; on lift come `pointerup`, `touchend`, then trusted `mousedown`, `mouseup` and `click` on the trigger, and it closes.
- After: the menu stays open through that `click`, in a shadow root too; a tap or mouse click outside still closes it.
- iOS Safari reportedly sends the `mousedown` mid-hold; the same gesture is skipped, but WebKit was not run here.
- Regression proof: the long-press, touch `contextmenu` and moved-menu unit cases and both Chromium long-press cases fail on `main`; the mouse, pen and no-`mousedown` cases fail on the previous head and pass on `main`.

## Writing rubric results

R1 narration: the layer-runtime line is present tense.
R2 research: none.
R3 evidence: none in the record; the tests below verify the line.
R4 rejected alternatives: none.
R5 change references: none.
R6 open questions: none.

## Scope

- [x] One defect is restored.
- [x] Separable contradictory or unsettled tagalongs were removed or split.
- [x] No new public API, visual representation, default, or interaction model is hidden under the bug-fix label.
- [x] Public text and artifacts contain no internal Meta context.

## Testing

- Maintainer merge 690291d brought in `main`: `ContextMenu.spec.md` takes `main`'s table, whose FR5 already routes the long-press lift to `spec:AST-094` FR33, so this PR no longer proposes FR11; the changeset names only the Chromium lift the tests show. The code, tests and `layer-runtime.md` line are unchanged.
- Review round (163af16, rebased onto `main` 8b74911): narrowed to the long-press lift per the owner's requested change. `main`'s outside `mousedown` listener returns with one skip, the opening finger press's compatibility events (shared gesture counter); the pointer listeners, the nested-root levels and the five other outcome changes are gone. FR11, `layer-runtime.md` and the changeset say only that. ContextMenu, DropdownMenu, hooks, Layer and CLI suites: 1422 tests; long-press, shadow-root and ContextMenu audit Chromium specs: 23; native types, typecheck, `eslint` (strict), `check:knowledge` and the Storybook build pass.
- Rebased onto `main` 39b5981 (486cec8), patch unchanged: the `typecheck` job's native platform types step runs a script `main` added in #8024, which 1fe5329's older base lacked. ContextMenu, DropdownMenu, hooks and CLI suites: 1216 tests; the long-press and shadow-root Chromium specs: 5; the native typecheck, build and platform-types steps, typecheck, `eslint` (strict), `check:knowledge` and the Storybook build pass.
- Review round (1fe5329): the document `pointerup`/`pointercancel` listeners come on with an outside finger or pen press and off once none is live, instead of staying for the whole open menu (`architecture:react-component-runtime` INV5); `layer-runtime.md` says so. A new case shows none attached while the menu is open at rest and none after the lift; it fails on the previous head. ContextMenu, DropdownMenu, hooks and CLI suites: 1151 tests; the long-press and shadow-root Chromium specs: 5; typecheck, `eslint` (strict), `check:knowledge` and the Storybook build pass.

```
Rebased onto main 9f3ab05 (a5784a5, one commit): #7914 judged presses inside a shadow root with a `mousedown` listener on the menu's root, run before the document's. Capture reaches the document first, so each root from the document down to the menu's own now listens in the capture phase and defers a press on the host of the next root down; a press on such a host itself is judged by that host, whatever the host's own listeners do. #7914's open, closed and nested cases fire pointer events and also lift a finger on the menu; a new case stops presses in each root and on a host. They fail with the document judging every press (#7914's cases), with roots listening as the press bubbles, and with only the menu's own root listening (the new case). The `a11y/Menu press in a shadow root` stories gain a ContextMenu; the shadow-root spec checks in Chromium that a clicked item is picked (red with the document judging every press), that a press or a tap on the host closes the menu, and that its opening long press does not. `layer-runtime.md` names the extra listeners.
  vitest ContextMenu, DropdownMenu, Selector, hooks, Breadcrumbs   Tests 1193 passed
  playwright MenuPressShadowRoot, ContextMenuLongPress, ContextMenuAudit --project=chromium   23 passed
  typecheck, lint:strict, check:knowledge, storybook:build   ✓

Review round 3: rebased onto main 95e1674 as one commit; the rule is FR11, since #7303 proposes FR10 in the same record:
  vitest ContextMenu, DropdownMenu, useLongPress, docProp*   Tests 376 passed
  playwright ContextMenu/__tests__ --project=chromium   23 passed
  typecheck, lint:strict, check:knowledge, storybook:build   ✓

Review round 2: the listeners run in the capture phase, so a control that stops the press (ResizeHandle, Table's column-resize handle) still closes the menu; new case "closes on a press whose control stops it" fails with bubble-phase listeners:
  vitest ContextMenu, DropdownMenu, useLongPress, docProp*   Tests 374 passed (DropdownMenuLazySheet's import hook timed out at 10 s under load; 2 passed alone)
  playwright ContextMenu/__tests__ --project=chromium   23 passed
  typecheck, lint:strict, check:knowledge, storybook:build   ✓

Review round: the three changed presses are named (changeset, body, commit message), a new case pins the cancelled press, the unpanned drag and a second finger's tap (it fails on `main`), and docs/architecture/layer-runtime.md names the new listeners:
  vitest ContextMenu, DropdownMenu, useLongPress, docProp*   Tests 375 passed
  playwright ContextMenu/__tests__ --project=chromium   23 passed
  typecheck, lint:strict, check:knowledge, storybook:build   ✓

Rebased onto main 22c592a as one commit. Main's record now has FR9 (overlay dismissal), so this rule was proposed FR10 (now FR11, beside #7303's FR10):
  vitest ContextMenu, DropdownMenu, hooks, docProp*   Tests 854 passed
  playwright ContextMenu/__tests__ --project=chromium   23 passed
  typecheck, lint:strict, check:knowledge, storybook:build   ✓
  red on main: `ContextMenuLongPress.a11y.chromium.spec.ts` against a `main` build: 1 failed (the long press and lift), 1 passed (the guard)

pnpm exec vitest run packages/core/src/ContextMenu/ContextMenu.test.tsx -t "ContextMenu outside dismissal"
  main's ContextMenu.tsx: 3 failed, 3 passed (tap/scroll, mouse and mid-tap re-render guards) · with the change: 6 passed
  (the pen case fails on main, where a pen closes it at once; the re-render case failed on an earlier head)

pnpm exec vitest run packages/core/src/ContextMenu packages/core/src/DropdownMenu packages/core/src/hooks/useLongPress.test.tsx \
  packages/core/src/hooks/useMenuPress.test.tsx packages/core/src/docPropLiterals.test.ts \
  packages/core/src/docPropReferences.test.ts --maxWorkers=8
  Test Files  9 passed (9)   Tests  324 passed (324)

pnpm storybook:build   (this branch; main for the red arm)
ASTRYX_STORYBOOK_DIR=<main build> pnpm exec playwright test \
  packages/core/src/ContextMenu/__tests__/ContextMenuLongPress.a11y.chromium.spec.ts --project=chromium
  1 failed, 1 passed   (long press: the menu is gone after the lift's click; mouse guard passes)
pnpm exec playwright test packages/core/src/ContextMenu/__tests__/ContextMenuLongPress.a11y.chromium.spec.ts --project=chromium
  2 passed · --repeat-each=2: 4 passed

pnpm -F @astryxdesign/core typecheck, pnpm lint:strict, check:knowledge   ✓
```

This branch was successfully deployed

1 active deployment
Preview — cb26ef54 Deployed Oct 22, 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.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug] Selector, DropdownMenu, and ContextMenu ignore option clicks inside a shadow root

1 participant