spectrum-web-components icon indicating copy to clipboard operation
spectrum-web-components copied to clipboard

[Bug]: Overlay in focus region dismissed when click into its content

Open spdev3000 opened this issue 5 months ago • 1 comments

Code of conduct

  • [x] I agree to follow this project's code of conduct.

Impacted component(s)

Overlay, ActionButton

Library version

1.7.0

Expected behavior

When using sp-overlay (type=auto) with a button and the user clicks on any item in the overlay content - the overlay should stay open.

Actual behavior

When that button and sp-overlay are wrapped into a focusable div (with tabindex=0) clicking into the overlay content auto-closes it.

Screenshots

No response

What browsers are you seeing the problem in?

No response

How can we reproduce this issue?

  1. Go to https://stackblitz.com/edit/vitejs-vite-tqg9vjko?file=src%2Fmy-element.ts
  2. Click on first or second button
  3. See overlay content with popover
  4. Click on overlay content
  5. See overlay closes
  6. Click on 3rd button (that is not wrapped into focusable div) - and overlay doesn't close when clicking into its content

Sample code or abstract reproduction which illustrates the problem

No response

Severity

None

Logs taken while reproducing problem

No response

Would you like to track this issue in Jira?

  • [x] Yes, please tell me the ticket number!

spdev3000 avatar Sep 16 '25 11:09 spdev3000

SWC-1336

najikahalsema avatar Oct 29 '25 22:10 najikahalsema