||View All MessagesBack to WebFX|
I did this too, but I've noticed that it doesn't always solve the problem. Perhaps there's another way to ensure that readyState=='complete' before returning the sizes?
(I just sent a bug request as well for this)
From: Ed Schiebel
Sent: July 2, 2002
Subject: Re:DHTML4 menu sizing bug
Before displaying a popup menu, you create an iframe, load the menu's html in the iframe's document, and then query the resulting docunent.body.scrollHeight and width.
I have found that in some cases, the iframe's document.readyState isn't "complete" for the first menu opened. The menu's resulting popup window is the wrong size.
I fixed this bug by changing MenuItem.showSubMenu. In the function being passed to window.setTimeout (sm._showTimer) I added a call to sm.getMeasureDocument(). This gets the document created, then its readyState completes while ie is back in its message pump.