From 6fbabf4c2bc996341c13995d220c47f4d20bce22 Mon Sep 17 00:00:00 2001 From: jlukic Date: Fri, 10 Jul 2015 12:11:08 -0400 Subject: [PATCH] #2576 Modal will remove body style after hiding --- src/definitions/modules/modal.js | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) diff --git a/src/definitions/modules/modal.js b/src/definitions/modules/modal.js index 8c44f34f8..b2adead4b 100644 --- a/src/definitions/modules/modal.js +++ b/src/definitions/modules/modal.js @@ -408,10 +408,8 @@ $.fn.modal = function(parameters) { hideDimmer: function() { if( $dimmable.dimmer('is animating') || ($dimmable.dimmer('is active')) ) { $dimmable.dimmer('hide', function() { - if(settings.transition && $.fn.transition !== undefined && $module.transition('is supported')) { - module.remove.clickaway(); - module.remove.screenHeight(); - } + module.remove.clickaway(); + module.remove.screenHeight(); }); } else { @@ -497,14 +495,18 @@ $.fn.modal = function(parameters) { ; } }, - screenHeight: function() { - if(module.cache.height > module.cache.pageHeight) { - module.debug('Removing page height'); - $body - .css('height', '') - ; + bodyStyle: function() { + if($body.attr('style') === '') { + module.verbose('Removing style attribute'); + $body.removeAttr('style'); } }, + screenHeight: function() { + module.debug('Removing page height'); + $body + .css('height', '') + ; + }, keyboardShortcuts: function() { module.verbose('Removing keyboard shortcuts'); $document