Javascript popups given wrong size




16 years ago
10 years ago


(Reporter: rafemonkey, Assigned: jst)


Windows 98

Firefox Tracking Flags

(Not tracked)





16 years ago
User-Agent:       Mozilla/5.0 (Windows; U; Win98; en-US; rv:1.2a) Gecko/20020910
Build Identifier: Mozilla/5.0 (Windows; U; Win98; en-US; rv:1.2a) Gecko/20020910

I belive this is similar to bug #148958
( Mozz seems to ignore the
size requirements of javascript windows, but helpfully follows all other window
hints (such as whether to allow window resizing) leading to frequently un-usable
pop ups. An example of this my be found at
their code requests a 400x420 window, however Moz generates a widow which is
much narrower. This page renders correctly in Opera 6.03, and MSIE 5.5. A
screenshot of the problem may be found at and the correct display may be
seen here (Though I notice that
Opera ignores the other window hints... Yay Mozilla!)
And, just to be complete here is the code that generates popups for the above site:
function popWindow(url, width, height, windowName)
        //get center coords
        var leftPosition = (screen.width - width) / 2;
        var topPosition = (screen.height - height) / 2;
       , windowName, 'width=' + width + ',height=' + height
+ ',left=' + leftPosition + ',top=' + topPosition +

and the call that makes the window in question:
function trailersPopup()
        popWindow("trailers.html", 400, 420, "trailers");

Reproducible: Always

Steps to Reproduce:
1.go to
2.clock on trailers button in amazement

Actual Results:  
got an incorrectly sized window (see )

Expected Results:  
rendered a properly sized window (see )

My computer is a AMD k6-2 550 with 256mb rame, a TNT2 m64, and 2 or 3 gigs free
on the harddrive. In Scrips & plugins preferences, I have enabled "Move or
resize windows".

Comment 1

16 years ago
Ugh... Yahoo won't let you link directly to images. Please use:
instead of the .jpg files
You don't have the preference to override setting width/height via
set do you?

Comment 3

16 years ago
Hmm I'm not sure I have that preference...
Under scripts and plugins I have:

allow scripts to...
Open unrequested windows (unchecked)
Move or resize exsisting windows (checked)
Raise or lower windows (unchecked)
Hide the statusbar (unchecked)
Change the statusbar text (unchecked)
Change Images (checked)
Create or change cookies (checked)
Read cookies (checked)

I just dug through the prefs dir (I shoulda thought to
look there first) but didn't find anything relating to I checked pref\all.js and a bunch of

I bet this is the case, I just noticed that when the
window of my browser is "unmaximized" it's the same
size as the windows that get popped up... But I can't
find this preference anywhere, where does it usualy

Comment 4

16 years ago
WFM on Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.2a) Gecko/20020910

Comment 5

16 years ago
A thousand pardons... this apears to be a bug with the lo-fi theme, I switched
themes... and hey presto... works for me. Sorry for the trouble.
Last Resolved: 16 years ago
Resolution: --- → INVALID

Comment 6

16 years ago


10 years ago
Component: DOM: HTML → DOM: Core & HTML
QA Contact: stummala → general
You need to log in before you can comment on or make changes to this bug.