Closed daolf closed 8 years ago
We can see that the modifier class is added to the wrapper but not removed on close:
Remodal.prototype.close = function(reason) { var remodal = this; debugger // Check if the animation was completed if (remodal.state === STATES.OPENING || remodal.state === STATES.CLOSING) { return; } if ( remodal.settings.hashTracking && remodal.$modal.attr('data-' + PLUGIN_NAME + '-id') === location.hash.substr(1) ) { location.hash = ''; $(window).scrollTop(scrollTop); } syncWithAnimation( function() { setState(remodal, STATES.CLOSING, false, reason); }, function() { remodal.$bg.removeClass(remodal.settings.modifier); remodal.$overlay.removeClass(remodal.settings.modifier).hide(); // ------------------ Here -------------------------- remodal.$wrapper.hide(); unlockScreen(); setState(remodal, STATES.CLOSED, false, reason); }, remodal); };`
The fix would simply be to replace
remodal.$wrapper.hide();
By
remodal.$wrapper.removeClass(remodal.settings.modifier);
I can submit a pull request if this is accepted.
PS: I noticed that the modifier is not removed from the $remodal el as well
Wrapper is a per-instance element. Bg, overlay are not.
We can see that the modifier class is added to the wrapper but not removed on close:
The fix would simply be to replace
By
I can submit a pull request if this is accepted.
PS: I noticed that the modifier is not removed from the $remodal el as well