Peter Schroeder

Navigation

Skip navigation.

Search

Site navigation

Email conversation

FromPeter Schroeder
ToMe
SubjectUsing Perfect Popups with Firefox 1 Preview Release
Date8 October 2004 19:04
I came across your Perfect Popups code
(http://www.howtocreate.co.uk/perfectPopups.html) today and encountered an
issue using Firefox Version 1.0 Preview Release under WindowsXP.

The code and your own examples on that page work perfectly using Internet
Explorer 6; however, using the example provided, when it resizes the popup
under Firefox there is extra space at the bottom (20-22px or so).

Any ideas on why this happens under Firefox?  And is there an easy fix that
won't affect the results for other browsers?

Peter Schroeder
FromMe
ToPeter Schroeder
SubjectRe: Using Perfect Popups with Firefox 1 Preview Release
Date9 October 2004 15:55
Peter,

Well, I'd have to say that this threw me for a while, because amongst the
many browsers I test with is FireFox preview release 1, and I had never
seen this effect.

However, I have managed to reproduce it. I'm willing to bet that you are
using an 800 x 600 screen resolution. And I am also willing to bet that you
only saw this bug on the image popups, not the plain text one. Because of a
security risk in FireFox, they prevent the address and tab bars from hiding.
This adds extra height to the window. Normally, this would not be a problem.

However, with the example I provided, the image is actually too large. In
order to remove scrollbars, the script must resize the window making it
larger than the size of the image. At this point, because of the
combination of low screen resolution, large image and extra toolbars, it
runs out of desktop space, and FireFox truncates the window.

When the script takes its measurements, it does not realise that FireFox
has truncated the window, so it gets the calculation wrong. For most pages,
this would not cause any problems at all. It is only a problem in my
example because the image is too large for low resolutions in FireFox.

I will add a note to this effect on the perfect popups page.

Thanks for the info.

Mark 'Tarquin' Wilton-Jones - author of http://www.howtocreate.co.uk/
FromPeter Schroeder
ToMe
SubjectRe: Using Perfect Popups with Firefox 1 Preview Release
Date9 October 2004 16:14
Attachmentscreenshot of the bug
Mark -

My setup at work is three monitors - one at 1920x1200 and two at 1280x1024,
and I only experienced the problem with the plain text popup.  The image
ones worked fine.

I am testing now from my home PC (1600x1200 resolution under WindowsXP),
also using Firefox 1.0 Preview Release, and I am experiencing the same
results.  The text popup has an extra blank line below the text, almost
like there was an extra <br> in the content itself (I am attaching a screen
shot of the popup).  IE6 does not have the extra line, and, again, the
image popups work correctly using both browsers.

Hope this info is helpful!

Peter Schroeder
FromMe
ToPeter Schroeder
SubjectRe: Using Perfect Popups with Firefox 1 Preview Release
Date9 October 2004 17:34
Peter,

> Hope this info is helpful!

Sure was, but not at all what I expected. I managed to reproduce it. I was
using a slightly older build (still called preview release), this only
happens in the new build. The newer build does not have the image problem,
as they now allow the address bar to be hidden, presumably they think they
found another way to avoid the security risk (although personally, I can
see a very easy way around it, but never mind about that for now, it is a
separate issue). Ok ... the explaination:

In the new build, there is no way to control if the status bar should be
shown from a script, and FireFox does not seem to be able to decide whether
it should appear or not (if you resize the popup by dragging the bottom of
the window, you will see what I mean). Considering the bizzare way this
behaves, I feel it is a bug in FireFox. You will notice that if you make the
window too small, a scrollbar does not appear, even though it should (the
horizontal scrollbar _does_ appear if you make it too narrow, as long as the
window is high enough for it to appear). I think they might have internally
applied the min-height style to the viewport, but not locked the window
itself to this minimum height. Since this is almost certainly a bug, it
should hopefully be fixed by the Mozilla team.

While the window is larger (during the resize), the status bar is showing.
After the final resize, it is hidden. The script has no way of knowing this,
so it leaves the space for the status bar. If you put another couple of
lines of text in the popup, the status bar will appear, and it will work
perfectly. Until they fix the bug, adding more text is the only way to
avoid the gap. Yet another note I have to put on the page.


Tarquin
FromPeter Schroeder
ToMe
SubjectRe: Using Perfect Popups with Firefox 1 Preview Release
Date9 October 2004 22:01
Very interesting.

A further note:
In Firefox, under Tools/Options/Web Features, clicking the 'Advanced'
button next to 'Enable Javascript' gives you a list of things scripts are
allowed to do.  One of them is 'Hide the status bar'.  If this is checked,
the problem you describe goes away and the popups resize properly, as the
status bar is hidden at all points.  Of course, this is not the default
setup for Firefox.

I tend to agree, this really looks like a Firefox bug.

Peter Schroeder
This site was created by Mark "Tarquin" Wilton-Jones.
Don't click this link unless you want to be banned from our site.