DHTML Menu is broken in Firefox 6

Having problems with DHTML Menu? There is usually somebody here who knows the answer.
Post Reply
trondonu
Beginner
Beginner
Posts: 1
Joined: Thu Aug 25, 2011 12:35 pm

DHTML Menu is broken in Firefox 6

Post by trondonu »

During our testing, we discovered that our menu is broken in Firefox 6. Upon further investigation we discovered that the root cause was that Firefox 6 removed the document.width and document.height properties (https://bugzilla.mozilla.org/show_bug.cgi?id=585877) causing the following milonic code to break:

if ((typeof(_W.innerHeight) === "number") && (typeof(_d.width) === "number")) // _W for Window, _d for Document
_bH = ((_d.width > _W.innerWidth) ? _W.innerHeight - 16 : _W.innerHeight);
else
_bH = (ch && bh) ? Math.min(ch, bh) : (ch || bh);

The simplified version of the menu that shows this problem can be seen here: http://jsfiddle.net/CjJU2/4/

The submenu of Company > Records in Firefox 5 covers the whole lenght of the window as shown in the following picture: http://i51.tinypic.com/21ctms0.png
The same submenu in Firefox 6 is short, because the length was computed using the "else" condition above. Here's how it looks like: http://i52.tinypic.com/axgrcp.png

Please take a look and let us know how we can get this fixed. Thank you in advance for your help!
- Tony
Post Reply