diff --git a/core/modules/responsive_preview/js/responsive-preview.js b/core/modules/responsive_preview/js/responsive-preview.js index 04ae40d..af7a18f 100644 --- a/core/modules/responsive_preview/js/responsive-preview.js +++ b/core/modules/responsive_preview/js/responsive-preview.js @@ -117,6 +117,13 @@ Drupal.behaviors.responsivePreview = { var $frameBody = $(window.self.document.body).once('responsive-preview'); if ($frameBody.length > 0) { $frameBody.get(0).className += ' responsive-preview-frame'; + // Call Drupal.displace in the next process frame to relayout the page + // in the iframe. This will ensure that no gaps in the presentation + // exist from elements that are hidden, such as the toolbar. + var win = window; + window.setTimeout(function () { + win.Drupal.displace(); + }, 0); } } }, @@ -211,7 +218,7 @@ Drupal.responsivePreview = Drupal.responsivePreview || { }, views: { /** - * + * Manages the PreviewView. */ AppView: Backbone.View.extend({