Closed
Bug 46991
Opened 24 years ago
Closed 24 years ago
[RFE] when setting window size the sidebar should be taken in account
Categories
(Core :: DOM: Core & HTML, enhancement, P3)
Tracking
()
RESOLVED
WORKSFORME
Future
People
(Reporter: devotip, Assigned: danm.moz)
References
()
Details
Attachments
(2 files)
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (Windows; U; Win98; en-US; m18) Gecko/20000729
BuildID: 2000072920
When using something like window.resizeTo(600,500) to change the window size
Mozilla should offset the selected values to take in account the sidebar and the
collapsable upper bars otherwise you'll get an unreadable page like in the
provided url
http://www.televideo.rai.it/catturatutte.asp?tlv=102_01
IMO the guy who did the html generator for that url has to be insane
Reproducible: Always
Steps to Reproduce:
1.Open the url
Actual Results: Page crippled because of sidebar
Expected Results: enought estate to display the page content
Comment 1•24 years ago
|
||
setting status to new. over to DOM.
Assignee: asa → jst
Status: UNCONFIRMED → NEW
Component: Browser-General → DOM Level 0
Ever confirmed: true
QA Contact: doronr → desale
Reporter | ||
Comment 2•24 years ago
|
||
Reporter | ||
Comment 3•24 years ago
|
||
Things are never simple. I agree with you (sort of) that innerWidth and
innerHeight should refer to the HTML content area; that is, exclude the sidebar.
There is a question of just what does window.resizeTo() refer to, though. Here's
a little compatibility chart:
Browser resizeTo inner* outer*
IE =outer* ignored ignored
Navigator 4 =inner* content area window
Mozilla =outer* content area? window
HTML book =outer* content area window
So we have multiple standards here, as usual. With apologies to the Navigator
faithful who write websites using resizeTo as does Navigator, I think Mozilla is
correct in treating resizeTo as does the market share leader: a specification for
the total window size. Regardless, it's not *that* important an issue, since
sites using resizeTo will get different behaviour for Navigator and IE, anyway.
There is still a problem with Mozilla's treatment of inner*. It looks like
after a resizeTo using a width of less than about 360, then setting innerWidth
doesn't quite set the window as wide as it should (the first time. a second time
works as it should.) But that's a different problem.
Test case for simultaneous use with your favourite browsers: (Note the duplicate
set of sizing buttons: I couldn't get Navigator 4 to work with the configurable
ones, so I added a hardwired set.)
<html><head>
<script>
function useResize() {
resizeTo(parseInt(document.sizeform.w.value),
parseInt(document.sizeform.h.value));
}
function useInner() {
window.innerWidth = parseInt(document.sizeform.w.value);
window.innerHeight = parseInt(document.sizeform.h.value);
}
function useOuter() {
window.outerWidth = parseInt(document.sizeform.w.value);
window.outerHeight = parseInt(document.sizeform.h.value);
}
</script>
</head><body>
<form name="sizeform">
width <input type=text value="300" id=w maxlength=5><br>
height <input type=text value="300" id=h maxlength=5>
<br>
<input type=button onclick="useResize()" value="resizeTo">
<input type=button onclick="useInner()" value="inner size">
<input type=button onclick="useOuter()" value="outer size">
<br>
<input type=button onclick="resizeTo(300,300)" value="resizeTo(300)">
<input type=button onclick="innerWidth=300;innerHeight=300"
value="inner size 300">
<input type=button onclick="outerWidth=300;outerHeight=300"
value="outer size 300">
</form>
</body></html>
I'm saying the browser works as it should, except that innerWidth-after-resize
glitch mentioned above. Which would be a different bug. Closing as "works for
me."
Status: NEW → RESOLVED
Closed: 24 years ago
Resolution: --- → WORKSFORME
Target Milestone: --- → Future
You need to log in
before you can comment on or make changes to this bug.
Description
•