The code is in this thread over in ext:help:
I tested on Firefox 3.x and IE 7.x - same behavior, which is:
A visual check is to use Firebug to stop at a break point just after the call to "doLayout", and dive down into the accordion panel's object model like so: "accordionPanel.body.dom.childNodes" and you'll see the removed component still listed alone with the one you just added.
- Have a basic panel with an accordion layout containing two or more panels.
- Remove one of the panels and add another, calling doLayout like everyone tells you to.
- Click on Accordion panel headers to minimize them all, and be amazed to find the panel you removed in a ghost-like state where its header only sometimes respects being visible in the accordion layout while expanding and collapsing other members of the panel.