fix(dialog): revert close event timing to dispatch immediately [BREAKING CHANGE] #5633
+4
−28
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
This PR reverts the breaking change introduced in
SWC 1.0.3
PR #4937 that moved the close event dispatch from immediate to post-animation completion. The change was causing issues for applications that rely on immediate close event handling, such as route changes and state cleanup.Problem
The previous change in PR #4937 moved the close event to fire after animations complete, which:
Solution
Revert the close event timing to dispatch immediately when
dialog.close()
is called, while maintaining proper animation coordination through the existingsp-closed
event from the overlay system.Changes Made
close()
method to dispatch close event immediately(dispatchClosed, hasTransitionDuration)
Breaking Change
This is a breaking change that reverts the previous breaking change from SWC 1.0.3. Applications that were updated to work with the delayed close event timing will need to be updated to handle immediate close events again.
Related issue(s)
Screenshots (if appropriate)
Author's checklist
Reviewer's checklist
patch
,minor
, ormajor
featuresManual review test cases
Descriptive Test Statement
Descriptive Test Statement
Device review