diff --git a/mozilla/xpfe/browser/resources/content/pageInfo.js b/mozilla/xpfe/browser/resources/content/pageInfo.js
index c43877f097e..49fe5d8eb3b 100644
--- a/mozilla/xpfe/browser/resources/content/pageInfo.js
+++ b/mozilla/xpfe/browser/resources/content/pageInfo.js
@@ -163,18 +163,31 @@ function makeImageTree(page, root)
function onImageSelect()
{
- var tree = document.getElementById("imageTree");
var imageFrame = document.getElementById("imageFrame");
+ imageFrame.setAttribute("src", "about:blank");
+
+ var tree = document.getElementById("imageTree");
if (tree.selectedItems.length == 1)
{
var clickedRow = tree.selectedItems[0].firstChild;
var firstCell = clickedRow.firstChild;
var imageUrl = firstCell.getAttribute("label");
- imageFrame.setAttribute("src", imageUrl);
+
+ /* The image has to be placed after a setTimeout because of bug 62517. */
+ setTimeout(placeImage, 0, imageFrame, imageUrl);
}
}
+function placeImage(imageFrame, imageUrl)
+{
+ var imageDoc = imageFrame.contentDocument;
+ var imageNode = imageDoc.createElement("img");
+ imageNode.setAttribute("src", imageUrl);
+
+ imageDoc.documentElement.appendChild(imageNode);
+}
+
function BrowserClose()
{
window.close();
diff --git a/mozilla/xpfe/browser/resources/content/pageInfo.xul b/mozilla/xpfe/browser/resources/content/pageInfo.xul
index 50163590adc..47a9b362e26 100644
--- a/mozilla/xpfe/browser/resources/content/pageInfo.xul
+++ b/mozilla/xpfe/browser/resources/content/pageInfo.xul
@@ -139,7 +139,7 @@
-
+