Fix image preview by working around the XUL reflow bug. Bug 265416, r=glazou,

sr=neil
This commit is contained in:
bzbarsky%mit.edu 2004-10-27 14:51:33 +00:00
Родитель fa3aaa6f83
Коммит 396fd33ea1
1 изменённых файлов: 3 добавлений и 0 удалений

Просмотреть файл

@ -332,6 +332,8 @@ function PreviewImageLoaded()
function LoadPreviewImage()
{
gDialog.PreviewSize.collapsed = true;
// XXXbz workaround for bug 265416 / bug 266284
gDialog.ImageHolder.collapsed = true;
var imageSrc = TrimString(gDialog.srcInput.value);
if (!imageSrc)
@ -374,6 +376,7 @@ function LoadPreviewImage()
{
// set the src before appending to the document -- see bug 198435 for why
// this is needed.
// XXXbz that bug is long-since fixed. Is this still needed?
gDialog.PreviewImage.addEventListener("load", PreviewImageLoaded, true);
gDialog.PreviewImage.src = imageSrc;
gDialog.ImageHolder.appendChild(gDialog.PreviewImage);