adobe / adobe/spectrum-web-components

[Bug]: Cancel events close all modal overlays instead of only the top overlay

Open
#6,080 2 comments 0 reactions 0 assignees View on GitHub
bug Component:Overlay SEV 2 Status:WIP
Dominant language
TypeScript
Stars
1.5k
Forks
262
Avg merge
3d 10h
Merged PRs (30d)
68

Description

### Code of conduct

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

### Impacted component(s)

sp-overlay

### Library version

1.11.2

### Expected behavior

The cancel event should close only the modal overlay from where the event originated.

### Actual behavior

The cancel event closes all open modal overlays.

Example bug from Express: CCEX-276235

### Screenshots

_No response_

### What browsers are you seeing the problem in?

Chrome

### How can we reproduce this issue?

1. Have two modal overlays open
2. Dispatch a cancel event from one of the overlays
3. Observe both overlays closing

### Sample code or abstract reproduction which illustrates the problem

_No response_

### Severity

SEV 2

### Logs taken while reproducing problem

_No response_

### Would you like to track this issue in Jira?

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

Contributor guide

Open the contributing guide

Research direction

Start with the sp-overlay component and reproduce the issue using two open modal overlays, then dispatch a cancel event from one overlay. Done means the originating modal closes while the other remains open, matching the expected behavior described in the issue.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
frontend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.