File tree Expand file tree Collapse file tree 2 files changed +7
-4
lines changed
packages/kit-headless/src/components/modal Expand file tree Collapse file tree 2 files changed +7
-4
lines changed Original file line number Diff line number Diff line change
1
+ ---
2
+ ' @qwik-ui/headless ' : patch
3
+ ---
4
+
5
+ fix: Only run single modal close step
Original file line number Diff line number Diff line change @@ -31,8 +31,7 @@ export function useModal() {
31
31
} ,
32
32
{ once : true } ,
33
33
) ;
34
- }
35
- if ( transitionDuration !== '0s' ) {
34
+ } else if ( transitionDuration !== '0s' ) {
36
35
modal . addEventListener (
37
36
'transitionend' ,
38
37
( e ) => {
@@ -45,8 +44,7 @@ export function useModal() {
45
44
} ,
46
45
{ once : true } ,
47
46
) ;
48
- }
49
- if ( animationDuration === '0s' && transitionDuration === '0s' ) {
47
+ } else if ( animationDuration === '0s' && transitionDuration === '0s' ) {
50
48
delete modal . dataset . closing ;
51
49
modal . classList . remove ( 'modal-closing' ) ;
52
50
enableBodyScroll ( modal ) ;
You can’t perform that action at this time.
0 commit comments