diff --git a/core/misc/dialog/dialog.position.js b/core/misc/dialog/dialog.position.js index c0dd9df..93facc2 100644 --- a/core/misc/dialog/dialog.position.js +++ b/core/misc/dialog/dialog.position.js @@ -54,6 +54,14 @@ } } } + + // If we are not adjusting height but are adjusting min/maxHeight we need to + // set height property to 'auto'. If height is not set to 'auto' jQuery UI + // dialog _size() will ignore min/maxHeight attribute. + if (!adjustedOptions.hasOwnProperty('height') && (adjustedOptions.hasOwnProperty('minHeight') || adjustedOptions.hasOwnProperty('maxHeight'))) { + adjustedOptions['height'] = 'auto'; + } + // Offset the dialog center to be at the center of Drupal.displace.offsets. adjustedOptions = resetPosition(adjustedOptions); event.data.$element