#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: |
Description
Steps to recreate:
- Click the 'add button' button.
- Click the 'set content' button.
- Enter dijit.byId('button') in Firebug's console
You will see that the newly added button is not destroyed.
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"> <html> <head> <title>ContentPane Programmatic Test</title> <style> @import "../../../dojo/resources/dojo.css"; @import "../css/dijitTests.css"; </style> <!-- 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("dijit.form.Button"); dojo.require("dijit.form.ComboBox"); dojo.require("dijit.layout.ContentPane"); 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); } dojo.addOnLoad(function(){ cp = new dijit.layout.ContentPane({ id: "pane", content: "hello world", style: "border: solid black thin;" }); dojo.body().appendChild(cp.domNode); }); </script> </head> <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> </body> </html>
Change History (3)
comment:1 Changed 12 years ago by
comment:2 Changed 12 years ago by
Resolution: | → duplicate |
---|---|
Status: | new → closed |
thanks for pointing that out Les
comment:3 Changed 12 years ago by
Milestone: | 1.2.1 → tbd |
---|
Note: See
TracTickets for help on using
tickets.
This ticket is the same as 7784
http://trac.dojotoolkit.org/ticket/7784