Skip to content

Commit 27c5d2f

Browse files
authored
fix(modal): remove active class on hide
Also remove the active class when a modal is hidden. This makes sure the modal doesnt keep an in between added active class if hide was called when the show transition has not already ended. The class is already removed at the start of the hiding process and it is still needed there because of CSS settings which will otherwise disturb the hide animation. This PR fixes such a specific use case
1 parent bdc9edd commit 27c5d2f

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

src/definitions/modules/modal.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -673,6 +673,7 @@
673673
},
674674
onComplete: function () {
675675
module.unbind.scrollLock();
676+
module.remove.active();
676677
if (settings.allowMultiple) {
677678
$previousModal.addClass(className.front);
678679
$module.removeClass(className.front);

src/definitions/modules/transition.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -216,7 +216,7 @@
216216
module.restore.conditions();
217217
module.hide();
218218
} else if (module.is.inward()) {
219-
module.verbose('Animation is outward, showing element');
219+
module.verbose('Animation is inward, showing element');
220220
module.restore.conditions();
221221
module.show();
222222
} else {

0 commit comments

Comments
 (0)