Ver Fonte

#103 - problem with popup height when moveToDocRoot option is set

Alex Trofimov há 11 anos atrás
pai
commit
13cee6512e
1 ficheiros alterados com 9 adições e 5 exclusões
  1. 9 5
      inc/js/jquery.dolPopup.js

+ 9 - 5
inc/js/jquery.dolPopup.js

@@ -179,11 +179,15 @@
                 o.onBeforeShow();
                 o.onBeforeShow();
 
 
                 // transition effect
                 // transition effect
-                $el.addClass('bx-popup-inactive');
-                setTimeout(function () {
-                    $el.addClass('bx-popup-transitions bx-popup-active');
-                }, 10);
-    
+
+                if (o.moveToDocRoot) { 
+                    // we need to disable classes with "max-height:100%", since popup isn't in the root element, so animation will not work when moveToDocRoot option is set 
+                    $el.addClass('bx-popup-inactive');
+                    setTimeout(function () {
+                        $el.addClass('bx-popup-transitions bx-popup-active');
+                    }, 10);
+                }
+
                 // show popup
                 // show popup
                 $el.css({display: 'block', visibility: 'visible'});
                 $el.css({display: 'block', visibility: 'visible'});
                 if (o.fog) {
                 if (o.fog) {