Closed
Bug 7888
Opened 25 years ago
Closed 24 years ago
window.open disregards window size outerHeight,outerWidth arguments, opens with parent window size
Categories
(Core :: DOM: Core & HTML, defect, P3)
Tracking
()
VERIFIED
WORKSFORME
M18
People
(Reporter: ekrock, Assigned: danm.moz)
References
()
Details
(Whiteboard: [nsbeta2-][nsbeta3+])
AppR 06/09 base build on WinNT 4.0 SP3. Build 1999060909. to repro: 1) go to http://media.netscape.com/ 2) click "Launch ECXpert" button expected behavior: - opens window of size 710wx450h pixels actual behavior: - opens new window of size of parent window add'l information: clicking the button invokes this event handler: onClick="return openPPTPresoWin(710, 450, 'http://media.netscape.com/real/ecx10min/Index.htm', 'presoWin', 'http://media.netscape.com/real/ecx10min/Index.htm', true);"></FORM> ... which calls this function: function openPPTPresoWin (theWidth, theHeight, theURL, winName, altNav3URL, showAlert) { var presoWin; var winOptions = "location=no,menubar=yes,resizable=no," + "status=yes,titlebar=yes,toolbar=no,scrollbars=no"; if ( (is.nav3 || is.nav4up || is.ie4up) && (openPPTPresoWin.arguments.length > 5) && showAlert ) { if (typeof showAlert == "string") alert (showAlert); else alert ("The presentation will be opened in a new window.\nYou can close the presentation window by choosing File-->Close from the pulldown menu.\nWhen you close the presentation window, you will return to the window you were in before."); } var nav3ScreenHeight, nav3ScreenWidth; if (is.nav3) { var tool = java.awt.Toolkit; var size = new java.awt.Dimension(tool.getDefaultToolkit().getScreenSize()); var width = size.width.toString(); var height = size.height.toString(); nav3ScreenWidth=eval(width); nav3ScreenHeight=eval(height); } if (is.nav4up) winOptions += ",screenX=0,screenY=0,outerHeight=" + theHeight + ",outerWidth=" + theWidth; if (is.ie4up) winOptions += ",left=0,top=0,height=" + theHeight + ",width=" + theWidth; if (is.nav3) winOptions += ",height=" + theHeight + ",width=" + theWidth; if ((is.nav3) && (openPPTPresoWin.arguments.length > 2) && altNav3URL && (altNav3URL !="")) theURL = altNav3URL; if ((is.major >= 4) || (is.nav3)) { presoWin = window.open(theURL, winName, winOptions); // doing this on ie4 causes JavaScript error 'Access is denied' if (is.nav) presoWin.focus(); } else if (is.nav2) { alert ("Sorry, to view this presentation, you need an up-to-date copy " + "of Netscape Navigator! Please go to http://home.netscape.com/download/" + " (or click the Netscape 'N' logo) and download the latest version! It's free!"); } else { alert ("Sorry, to view this presentation, you need an up-to-date copy " + "of Netscape Navigator! Please go to http://home.netscape.com/download/" + " and download the latest version! It's free!"); } return false; } ... which really equates to this series of statements on Nav5: var winOptions = "location=no,menubar=yes,resizable=no," + "status=yes,titlebar=yes,toolbar=no,scrollbars=no"; if (is.nav4up) winOptions += ",screenX=0,screenY=0,outerHeight=" + theHeight + ",outerWidth=" + theWidth; presoWin = window.open(theURL, winName, winOptions); ... which *really* equates to this call: presoWin = window.open('http://media.netscape.com/real/ecx10min/Index.htm', 'presoWin', "location=no,menubar=yes,resizable=no," + "status=yes,titlebar=yes,toolbar=no,scrollbars=no" + ",screenX=0,screenY=0,outerHeight=710,outerWidth=450"); ... and the outerHeight and outerWidth arguments are clearly being ignored. Repeat steps in Nav4.51 to see difference.
Updated•25 years ago
|
Assignee: vidur → joki
Comment 1•25 years ago
|
||
This one belongs to Tom Pixley (cc:ing DanM, since he's been in the window.open code).
bulk moving all window-size-off-by-a-couple-of-pixels bugs to more distant milestone.
Target Milestone: M14 → M18
Updated•25 years ago
|
Keywords: 4xp
Summary: 4.xP window.open disregards window size outerHeight,outerWidth arguments, opens with parent window size → window.open disregards window size outerHeight,outerWidth arguments, opens with parent window size
Reporter | ||
Comment 7•24 years ago
|
||
Nominating nsbeta2. We have to start drawing a line on DOM0 backward compatibility; these bugs are supposed to be a high priority for nsbeta2 per the beta2 criteria.
Keywords: nsbeta2
Reporter | ||
Comment 9•24 years ago
|
||
Retested in 5/15 N6 Commericial build on WinNT 4.0 SP4. outerHeight and outerWidth are no longer completely ignored, but they're still a few pixels off, at least on height. Odd. May be dup of bug 17311 now, but we must verify that both pages display correctly once we think we've fixed. Leaving [nsbeta2+][6/15].
Reporter | ||
Comment 10•24 years ago
|
||
Since this probably won't make nsbeta2, nom. nsbeta3 & rtm, *strongly* recc. nsbeta3 hard-stop. window.open with size control is widely used ever since Nav4 and there is no standards-based equivalent in the W3C DOM; either this works correctly, or we've got no way to specify the window's width on opening. Both content sites and web applications need the ability to open new windows at a particular size--and often one needs to do that in terms of the outer (content area + chrome) width, not the inner (content area) width. Getting this correct by rtm is a critical part of our web content and web application platform.
Comment 11•24 years ago
|
||
Cleaning up whiteboard by marking beta2 minus (6/15 has passed). Folks are too doomed to get to this for beta2
Whiteboard: [nsbeta2+][6/15] → [nsbeta2-]
Comment 12•24 years ago
|
||
nsbeta3+
Whiteboard: [nsbeta2-] → [nsbeta2-][nsbeta3+]
Target Milestone: M19 → M18
Status: NEW → RESOLVED
Closed: 24 years ago
Resolution: --- → WORKSFORME
Assignee | ||
Comment 13•24 years ago
|
||
Working with the final, four line piece of code in the original bug report, that is, this window: <html><head> <script> function doit() { window.open('http://media.netscape.com/real/ecx10min/Index.htm', 'presoWin', "location=no,menubar=yes,resizable=no," + "status=yes,titlebar=yes,toolbar=no,scrollbars=no" + ",screenX=0,screenY=0,outerHeight=710,outerWidth=450"); } </script> </head><body> <form><input type=button value="Do it" onclick="doit()"></form> </body></html> In today's build, the window being opened isn't pretty -- the titlebar is incompletely drawn -- but its size exactly matches the size of the window opened by doing the same thing in Nav 4. This bug being about window size, I'm closing it.
You need to log in
before you can comment on or make changes to this bug.
Description
•