Skip to content

Commit

Permalink
fix(modals): fixed issue when initially opened modal closed without a…
Browse files Browse the repository at this point in the history
…nimation
  • Loading branch information
nolimits4web committed Apr 30, 2021
1 parent 840503e commit e2cff56
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/core/components/modal/modal-class.js
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,9 @@ class Modal extends Framework7Class {
}

if (!$el || $el.hasClass('modal-in')) {
if (animateModal === false && $el[0] && type !== 'dialog') {
$el[0].style.display = 'block';
}
return modal;
}

Expand Down Expand Up @@ -198,6 +201,7 @@ class Modal extends Framework7Class {

// Modal
$el[animate ? 'removeClass' : 'addClass']('not-animated');

function transitionEnd() {
if ($el.hasClass('modal-out')) {
modal.onClosed();
Expand Down

0 comments on commit e2cff56

Please sign in to comment.