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() {
3131 } ,
3232 { once : true } ,
3333 ) ;
34- }
35- if ( transitionDuration !== '0s' ) {
34+ } else if ( transitionDuration !== '0s' ) {
3635 modal . addEventListener (
3736 'transitionend' ,
3837 ( e ) => {
@@ -45,8 +44,7 @@ export function useModal() {
4544 } ,
4645 { once : true } ,
4746 ) ;
48- }
49- if ( animationDuration === '0s' && transitionDuration === '0s' ) {
47+ } else if ( animationDuration === '0s' && transitionDuration === '0s' ) {
5048 delete modal . dataset . closing ;
5149 modal . classList . remove ( 'modal-closing' ) ;
5250 enableBodyScroll ( modal ) ;
You can’t perform that action at this time.
0 commit comments