From 1046530ff680b62495176972aa39c02bbe3541ba Mon Sep 17 00:00:00 2001 From: Ingo Schommer Date: Mon, 24 Jun 2013 17:14:32 +0200 Subject: [PATCH] "Insert Media" dialog: Prevent loading indicator in IE8+ Fixes https://github.com/silverstripe/silverstripe-cms/issues/782 --- admin/javascript/ssui.core.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/admin/javascript/ssui.core.js b/admin/javascript/ssui.core.js index de5b8a0df..0b4261512 100644 --- a/admin/javascript/ssui.core.js +++ b/admin/javascript/ssui.core.js @@ -153,7 +153,7 @@ iframe.bind('load', function(e) { if($(this).attr('src') == 'about:blank') return; - $(this).show(); + iframe.addClass('loaded').show(); // more reliable than 'src' attr check (in IE) self._resizeIframe(); self.uiDialog.removeClass('loading'); }).hide(); @@ -170,7 +170,7 @@ var self = this, iframe = this.element.children('iframe'); // Load iframe - if(!iframe.attr('src') || this.options.reloadOnOpen) { + if(this.options.iframeUrl && (!iframe.hasClass('loaded') || this.options.reloadOnOpen)) { iframe.hide(); iframe.attr('src', this.options.iframeUrl); this.uiDialog.addClass('loading');