Closed
Bug 685261
Opened 14 years ago
Closed 14 years ago
Removal of proprietary document.width and document.height breaks web sites
Categories
(Firefox :: General, defect)
Tracking
()
RESOLVED
DUPLICATE
of bug 680301
People
(Reporter: martin.gossmann, Unassigned)
Details
User Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:6.0.1) Gecko/20100101 Firefox/6.0.1
Build ID: 20110830092941
Steps to reproduce:
Update from Version 5 to Version 6 (6.00, 6.01, 6.02)
Actual results:
A Popup Menu that worked fine with all versions of Firefox 3, 4 and 5 fails to work. Instead of appearing beside the mouse cursor while hover above an image map the popups appear at the top of the page.
Example: http://www.interkultur.de/gossmann/fsx/maiwmap.php
I checked with Firefox 7, this shows the same misbehavior.
A similar reported issue here (http://www.milonic.com/forum/viewtopic.php?f=10&t=10535) claims to have tracked it down to the removal of the document.width and document.height properties.
Expected results:
The same behavior like in the three former major Firefox branches: the popup should appear beside the mouse cursor.
According to https://developer.mozilla.org/En/Document.width sites should instead be using window.getComputedStyle(body, null).width and window.getComputedStyle(body, null).height
bug 585877 removed document.width and document.height because they are proprietary, undefined in any standards which means sites should never have relied upon them being there.
This could be a valid Tech Evangelism bug specifically for getting the authors of javascript libraries to correct their code, otherwise it is invalid.
Summary: Removal of document.width and document.height (reason unconfirmed) breaks web sites → Removal of proprietary document.width and document.height breaks web sites
Report is too general for Tech Evangelism, duping
Status: UNCONFIRMED → RESOLVED
Closed: 14 years ago
Resolution: --- → DUPLICATE
(In reply to Mardeg from comment #1)
> According to https://developer.mozilla.org/En/Document.width sites should
> instead be using window.getComputedStyle
That's an impractical advice. Much more common and cross-browser-compatible is
document.body.clientWidth
document.body.offsetHeight
I'll update MDN.
< document.body.offsetHeight
shoul be document.body.clientHeight (not much difference)
You need to log in
before you can comment on or make changes to this bug.
Description
•