Opened 13 years ago

Closed 13 years ago

Last modified 13 years ago

#7803 closed defect (duplicate)

Dojo 1.2 regression - widgets added programmatically to ContentPane are not destroyed

Reported by: Les Owned by:
Priority: blocker Milestone: tbd
Component: Dijit Version: 1.2beta
Keywords: Cc:
Blocked By: Blocking:


Steps to recreate:

  1. Click the 'add button' button.
  1. Click the 'set content' button.
  1. Enter dijit.byId('button') in Firebug's console

You will see that the newly added button is not destroyed.

	<title>ContentPane Programmatic Test</title>

		@import "../../../dojo/resources/dojo.css";
		@import "../css/dijitTests.css";
	<!-- required: the default dijit theme: -->
	<link id="themeStyles" rel="stylesheet" href="../../../dijit/themes/tundra/tundra.css">

	<!-- required: dojo.js -->
	<script type="text/javascript" src="../../../dojo/dojo.js"
		djConfig="isDebug: true, parseOnLoad: true"></script>

	<!-- only needed for alternate theme testing: do NOT use in your code! -->
	<script type="text/javascript" src="../_testCommon.js"></script>

	<script type="text/javascript">
		dojo.require("dijit.dijit"); // optimize: load dijit layer
		dojo.require("dojo.parser");	// scan page for widgets and instantiate them

		var cp;
		function addButton() {
			new dijit.form.Button({ id: 'button', label:"New Button" }).placeAt(dijit.byId('pane').domNode);

			cp = new dijit.layout.ContentPane({
				id: "pane",
				content: "hello world",
				style: "border: solid black thin;"
<body class="tundra">
	<h1 class="testTitle">Dijit layout.ContentPane programmatic tests</h1>

	<button onclick="addButton()">add button</button>
	<button onclick="cp.attr('content', 'hi there !!!')">set content</button>


Change History (3)

comment:1 Changed 13 years ago by Les

This ticket is the same as 7784

comment:2 Changed 13 years ago by Karl Tiedt

Resolution: duplicate
Status: newclosed

thanks for pointing that out Les

comment:3 Changed 13 years ago by Adam Peller

Milestone: 1.2.1tbd
Note: See TracTickets for help on using tickets.