diff options
Diffstat (limited to 'modules')
-rw-r--r-- | modules/overlay/overlay-parent.css | 4 | ||||
-rw-r--r-- | modules/overlay/overlay-parent.js | 10 |
2 files changed, 8 insertions, 6 deletions
diff --git a/modules/overlay/overlay-parent.css b/modules/overlay/overlay-parent.css index 0cbfc6d04..99f18eba8 100644 --- a/modules/overlay/overlay-parent.css +++ b/modules/overlay/overlay-parent.css @@ -97,6 +97,10 @@ body.overlay-autofit { overflow: hidden; width: 100%; height: 100%; + visibility: hidden; +} +.overlay-loaded #overlay-element { + visibility: visible; } /** diff --git a/modules/overlay/overlay-parent.js b/modules/overlay/overlay-parent.js index b2f0b16d6..1cb4f0392 100644 --- a/modules/overlay/overlay-parent.js +++ b/modules/overlay/overlay-parent.js @@ -283,19 +283,17 @@ Drupal.overlay.load = function (url) { // Change the overlay title. self.$container.dialog('option', 'title', Drupal.t('Loading...')); - // When a new overlay is opened and loaded, we add a loaded class to the - // dialog. The loaded class is not removed and added back again while - // switching between pages with the overlay already open, due to - // performance issues (see http://drupal.org/node/615130). + // While the overlay is loading, we remove the loaded class from the dialog. + // After the loading is finished, the loaded class is added back. The loaded + // class is being used to hide the iframe while loading. + // @see overlay-parent.css .overlay-loaded #overlay-element self.$dialog.removeClass('overlay-loaded'); self.$iframe - .css('visibility', 'hidden') .bind('load.overlay-event', function () { self.isLoading = false; // Only continue when overlay is still open and not closing. if (self.isOpen && !self.isClosing) { - self.$iframe.css('visibility', ''); self.$dialog.addClass('overlay-loaded'); } else { |