Opened 16 years ago

Last modified 11 years ago

#2056 closed defect

Menu inside ContentPane not cleaned up on ContentPane destroy or reload. — at Version 8

Reported by: [email protected] Owned by: Sam Foster
Priority: high Milestone: 1.6
Component: Dijit Version: 0.4
Keywords: Cc: ben hockey
Blocked By: Blocking:

Description (last modified by bill)

Only occurs in IE ( I'm using IE7 ), reproduced with 0.4.1rc2 also.

The attached page has a two content panes, one which has a button to load a new page into the second pane. The page initially loaded by the pane contains a menu widget. After loading another page which does not contain a menu widget, clicking anywhere on the page will result in a "offsetWidth is null or not an object" js error. This only occurs if the new page does not have a menu, loading a new page with a menu works fine.

I also ran into another bug while creating this repro case, in dom.js dojo.dom.destroyNode does node.outerHTML= to prevent a memory leak. In my repro case, node can be undefined. We should insure that node is not undefined before trying to clear the outerHTML.

Change History (12)

Changed 16 years ago by [email protected]

Attachment: test_Menu2_contentPane.html added

repro case, place in tests/widget

comment:1 Changed 16 years ago by bill

Milestone: 0.4.10.5

It doesn't seem valid for a ContentPane? to contain a Menu2 w/contextMenuForWindow="true". Can you try a simpler test, where the content pane just has a menu bar, or maybe a menu attached to a certain node?

Changed 16 years ago by [email protected]

a more simple test

Changed 16 years ago by [email protected]

simple test

Changed 16 years ago by [email protected]

simple test

comment:2 Changed 16 years ago by [email protected]

test_Menu2_contentPane.2.html uses two simple pages (attached) as content for the pane, and still reproduces the problem.

comment:3 Changed 16 years ago by [email protected]

not sure if this is the correct fix, but overriding the destroy method in dojo.widget.Menu2 solves the problem:

destroy: function() {

dojo.widget.PopupManager?.closed(this);

},

comment:4 Changed 15 years ago by bill

Component: WidgetsDijit
Milestone: 0.91.0

The PopupManager? code has been completely redone for 0.9 so this probably isn't an issue anymore, but need to test.

comment:5 Changed 15 years ago by bill

Milestone: 1.01.1

comment:6 Changed 15 years ago by bill

Summary: js error when using a menu2 inside a content paneMenu inside ContentPane not cleaned up on ContentPane destroy or reload.

See related bugs #3300 and #4980. This is currently broken because menus are moved to document.body and thus the cleanup doesn't work.

comment:7 Changed 14 years ago by bill

Milestone: 1.11.3

comment:8 Changed 14 years ago by bill

Description: modified (diff)
Milestone: 1.31.2
Owner: changed from bill to Sam Foster

Looks like this will be fixed by sfoster's conversion of ContentPane to use dojo.html.

Note: See TracTickets for help on using tickets.