Browse Source

Fixes issue with modal sometimes caching sizes when hidden #895, #951

pull/1129/head
jlukic 10 years ago
parent
commit
ddc5f636bf
1 changed files with 12 additions and 7 deletions
  1. 19
      src/definitions/modules/modal.js

19
src/definitions/modules/modal.js

@ -436,13 +436,18 @@ $.fn.modal = function(parameters) {
},
cacheSizes: function() {
module.cache = {
pageHeight : $(document).outerHeight(),
height : $module.outerHeight() + settings.offset,
contextHeight : (settings.context == 'body')
? $(window).height()
: $dimmable.height()
};
var
modalHeight = $module.outerHeight()
;
if(modalHeight !== 0) {
module.cache = {
pageHeight : $(document).outerHeight(),
height : modalHeight + settings.offset,
contextHeight : (settings.context == 'body')
? $(window).height()
: $dimmable.height()
};
}
module.debug('Caching modal and container sizes', module.cache);
},

Loading…
Cancel
Save