Closed Bug 219392 Opened 17 years ago Closed 17 years ago

incorrect return of the window.innerHeight property

Categories

(Core :: DOM: Core & HTML, defect)

x86
Windows XP
defect
Not set
normal

Tracking

()

RESOLVED INVALID

People

(Reporter: jonathan.deramaix, Unassigned)

Details

User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.5b) Gecko/20030827
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.5b) Gecko/20030827

When trying to size an element to a proportion of the client, the return value
is incorrect.
html:
...
<body onload="resizeIt('myID');">
...
<div id="myID">
...
</div>

javascript:
function resizeIt(id) {
  el = document.getElementById(id);
  el.style.height = window.innerHeight;
}

Reproducible: Always

Steps to Reproduce:
1. Just create the script
2. Run it
3.

Actual Results:  
the size is too large, not the correct client size (no matter if your window is
maximized or not)

Expected Results:  
expand the element to the normal size of the screen
Doesn't window.innerHeight include the scrollbars?  That is, if there is a
horizontal scrollbar, window.innerHeight will be the amount of space above the
scrollbar plus the height of the scrollbar...
Whiteboard: DUPEME
Yes, according to http://www.mozilla.org/docs/dom/domref/dom_window_ref.html,
window.innerheight:

"Gets/sets the height of the content area of the browser window including the
scrollbar, if present."
I'm RESOLVING this bug as INVALID because the issue described and involved is
clearly (per definition) not a Mozilla bug.
Status: UNCONFIRMED → RESOLVED
Closed: 17 years ago
Resolution: --- → INVALID
Whiteboard: DUPEME
You need to log in before you can comment on or make changes to this bug.