adobe / adobe/spectrum-web-components
[Bug]: Dialog close event timing change breaks applications expecting immediate event dispatch
- 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)
Dialog
### Library version
1.0.3
### Expected behavior
SWC dialogs actually have two distinct events for different purposes:
- close event - Should indicate the start of dialog closing (immediate)
- sp-closed event - should indicate the completion of dialog closing (after animations)
### Actual behavior
close event indicates the start of dialog close instead of end
### 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-vuew3kbr?file=src%2Fmy-element.ts
2. Add a close event on Dialog
3. console logs the two events
### Sample code or abstract reproduction which illustrates the problem
https://github.com/adobe/spectrum-web-components/pull/4937
### Severity
SEV 2
### Logs taken while reproducing problem
_No response_
### Would you like to track this issue in Jira?
- [ ] Yes, please tell me the ticket number!
Contributor guide
Research direction
Start with the Dialog implementation and the StackBlitz reproduction linked in the issue, then compare the event behavior discussed in pull request #4937. Verify that the close event is dispatched at the expected lifecycle point and that sp-closed still represents completion after animations; reproduce the two console logs to confirm the timing.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- frontend, web-dev
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100