Skip to content

Commit 0d162ed

Browse files
committed
Fix repostionning modal when the open doesn't exists anymore #168
1 parent 5a243fc commit 0d162ed

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

js/jquery.nyroModal.js

+5-3
Original file line numberDiff line numberDiff line change
@@ -696,11 +696,13 @@ jQuery(function($, undefined) {
696696
});
697697
},
698698
_resize: function() {
699-
var opens = $(':nmOpen').each(function() {
700-
$(this).data('nmObj')._unreposition();
699+
$.each(this.stack, function(k, v) {
700+
v.nmObj._unreposition();
701701
});
702702
this._calculateFullSize();
703-
opens.trigger('nmResize');
703+
$.each(this.stack, function(k, v) {
704+
v.nmObj.resize();
705+
});
704706
},
705707
_calculateFullSize: function() {
706708
this.fullSize = {

0 commit comments

Comments
 (0)