src/components/dialog/dialog.js
function stretchDialogContainerToViewport(container, options) {
      var isFixed = $window.getComputedStyle($document[0].body).position == 'fixed';
      var backdrop = options.backdrop ? $window.getComputedStyle(options.backdrop[0]) : null;
      var height = backdrop ? Math.min($document[0].body.clientHeight, Math.ceil(Math.abs(parseInt(backdrop.height, 10)))) : 0;

      var previousStyles = {
        top: container.css('top'),
        height: container.css('height')
      };

      // If the body is fixed, determine the distance to the viewport in relative from the parent.
      var parentTop = Math.abs(options.parent[0].getBoundingClientRect().top);

      container.css({
        top: (isFixed ? parentTop : 0) + 'px',
        height: height ? height + 'px' : '100%'
      });

      return function() {
        // Reverts the modified styles back to the previous values.
        // This is needed for contentElements, which should have the same styles after close
        // as before.
        container.css(previousStyles);
      };
    }
function stretchDialogContainerToViewport(container, options) {
      var isFixed = $window.getComputedStyle($document[0].body).position == 'fixed';
      var backdrop = options.backdrop ? $window.getComputedStyle(options.backdrop[0]) : null;
      var height = backdrop ? Math.min($document[0].body.clientHeight, Math.ceil(Math.abs(parseInt(backdrop.height, 10)))) : 0;

      var previousStyles = {
        top: container.css('top'),
        height: container.css('height')
      };

      // If the body is fixed, determine the distance to the viewport in relative from the parent.
      var parentTop = Math.abs(options.parent[0].getBoundingClientRect().top);

      container.css({
        top: (isFixed ? parentTop : 0) + 'px',
        height: height ? height + 'px' : '100%'
      });

      return function() {
        // Reverts the modified styles back to the previous values.
        // This is needed for contentElements, which should have the same styles after close
        // as before.
        container.css(previousStyles);
      };
    }
function stretchDialogContainerToViewport ( container , options ) { var isFixed = $window . getComputedStyle ( $document [ 0 ] . body ) . position == 'fixed' ; var backdrop = options . backdrop ? $window . getComputedStyle ( options . backdrop [ 0 ] ) : null ; var height = backdrop ? Math . min ( $document [ 0 ] . body . clientHeight , Math . ceil ( Math . abs ( parseInt ( backdrop . height , 10 ) ) ) ) : 0 ; var previousStyles = { top : container . css ( 'top' ) , height : container . css ( 'height' ) } ; // If the body is fixed, determine the distance to the viewport in relative from the parent. var parentTop = Math . abs ( options . parent [ 0 ] . getBoundingClientRect ( ) . top ) ; container . css ( { top : ( isFixed ? parentTop : 0 ) + 'px' , height : height ? height + 'px' : '100%' } ) ; return function ( ) { // Reverts the modified styles back to the previous values. // This is needed for contentElements, which should have the same styles after close // as before. container . css ( previousStyles ) ; } ; }
Ensure the dialog container fill-stretches to the viewport
Ensure the dialog container fill - stretches to the viewport