Opened 13 years ago

Closed 12 years ago

Last modified 12 years ago

#2266 closed defect (wontfix)

Including dojo.widget.menu2 on an iframe causes error in IE on multiple reloades

Reported by: guest Owned by: bill
Priority: high Milestone:
Component: Widgets Version: 0.4.1
Keywords: Cc:
Blocked By: Blocking:

Description

I am using the released version of dojo 0.4.1. The problem is seen only on IE (6 & 7, earlier versions not tested).

I have a floatingpane widget which contains an iframe. If the iframe contents are set to a page which contains "dojo.require("dojo.widget.Menu2")" it will load correctly once. If I destroy the floatingpane (and the enclosed iframe) and reload it then I get an error in IE:

"Can't execute code from a freed script"

Note that the iframe contents page contains nothing other than a header (<h4>) and two require statements:

dojo.require("dojo.event.*"); dojo.require("dojo.widget.Menu2");

If I simply comment out the line with the Menu2 requires, then the problem goes away. I'm not actually creating the menu or (purposely) running anything in that script.

I have a zip file containing my test case. I don't see a way to attach anything to this report. The problem is extremely reproducible - happens every time for me. Does not happen on Firefox. I haven't figured out a workaround yet since I don't really know where the interaction problem is.

This problem is very severe since my real application uses both the floatingpane and a popup menu and is created and destroyed on the fly like in my example.

You can contact me at stenduncan @ gmail.com (remove the spaces). I'll be happy to email my reproduceable test cases to whoever.

Attachments (1)

testpages.zip (6.5 KB) - added by guest 13 years ago.
Test cases

Download all attachments as: .zip

Change History (7)

Changed 13 years ago by guest

Attachment: testpages.zip added

Test cases

comment:1 Changed 13 years ago by dylan

Milestone: 0.4.2

comment:2 Changed 13 years ago by nicola.rizzo+dojo@…

The problem isn't Menu2, but PopupContainer?.

If you add this require:
dojo.require("dojo.widget.PopupContainer?");
in your index.html, everything works fine: without this require, three listeners are registered for onmousedown, onscroll and onkey, but they are never unregistered because the iframe is removed with a removeChild.
Maybe wontfix?

Nicola

comment:3 Changed 13 years ago by nicola.rizzo+dojo@…

I meant the iframe is removed with
theIframe = null

comment:4 Changed 12 years ago by bill

Resolution: wontfix
Status: newclosed

Thanks for the explanation Nicola. As you said, there's a simple workaround of requiring PopupContainer? from the main page, and then you can call dojo.widget.PopupManager?.registerWin() and unregisterWin() as you create and delete the iframe.

comment:5 Changed 12 years ago by stenduncan

Thanks for this solution. I have tried it and it seems to have solved the problem. Maybe something to add in your docs :-)

comment:6 Changed 12 years ago by (none)

Milestone: 0.4.2

Milestone 0.4.2 deleted

Note: See TracTickets for help on using tickets.