Skip to content

fix(popover): backport focus-leave dismissal to v2#2304

Open
alexwarren wants to merge 1 commit into
v2from
codex/backport-pr-2298-v2
Open

fix(popover): backport focus-leave dismissal to v2#2304
alexwarren wants to merge 1 commit into
v2from
codex/backport-pr-2298-v2

Conversation

@alexwarren

Copy link
Copy Markdown
Collaborator

Summary

Backports the popover focus-leave dismissal behavior from PR #2298 to the v2 branch.

  • Adds Classic popover focusout handling so menu popovers close when keyboard focus leaves the reference/popover pair.
  • Adds Svelte popover focus-leave handling, including controlled popover close requests and nested role="menu" detection.
  • Adds v2 docs guidance for menu popovers and restores the PR fix(popover): Fix popover focus-leave dismissal #2298 changeset.

Validation

  • npm run lint:ts -w packages/stacks-classic passed.
  • npm exec -w packages/stacks-svelte -- eslint src/components/Popover/Popover.svelte src/components/Popover/PopoverContent.svelte src/components/Popover/PopoverReference.svelte src/components/Popover/Popover.test.ts passed.
  • npm run build:dependencies -w packages/stacks-svelte passed with existing Less and bundle-size warnings.

Local validation blockers

  • Classic web-test-runner starts but fails before assertions because existing unit test imports hit local dependency module export errors from aria-query/lz-string.
  • Svelte web-test-runner fails before assertions because the local icon package does not export existing symbols such as IconShieldXSm.
  • npm run lint -w packages/stacks-svelte is blocked by the same existing missing icon exports across unrelated Svelte components/stories.
  • Root npx prettier could not parse the existing v2 docs HTML because of a pre-existing unmatched ; Svelte files were formatted via the workspace Prettier command instead.

@netlify

netlify Bot commented Jun 22, 2026

Copy link
Copy Markdown

Deploy Preview for stacks ready!

Name Link
🔨 Latest commit b2e6145
🔍 Latest deploy log https://app.netlify.com/projects/stacks/deploys/6a394b6f7925a800084f17d6
😎 Deploy Preview https://deploy-preview-2304--stacks.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@changeset-bot

changeset-bot Bot commented Jun 22, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: b2e6145

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 2 packages
Name Type
@stackoverflow/stacks Minor
@stackoverflow/stacks-svelte Major

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@alexwarren alexwarren changed the title [codex] fix(popover): backport focus-leave dismissal to v2 fix(popover): backport focus-leave dismissal to v2 Jun 22, 2026
@alexwarren alexwarren marked this pull request as ready for review June 22, 2026 14:50
@alexwarren alexwarren requested a review from a team as a code owner June 22, 2026 14:50

@asblanco asblanco 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.

LGTM 🐐 🐐 📰

@asblanco asblanco enabled auto-merge (squash) June 22, 2026 16:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants