Ticket #5412 (closed defect: invalid)
apparent problem destroying textarea: FF status line progress bar gets stuck
| Reported by: | rtweed@… | Owned by: | doughays |
|---|---|---|---|
| Priority: | normal | Milestone: | 1.1 |
| Component: | Dijit | Version: | 1.0 |
| Severity: | normal | Keywords: | |
| Cc: |
Description (last modified by bill) (diff)
Browser: Firefox 2.0.0.11 OS Windows XP SP2
I'm integrating Dojo widgets into our Ajax framework (eXtc Web Developer (EWD) : http://www.mgateway.com/ewd.htm), with great success. The EWD ajax framework uses innerHTML replacement of "fragments" of markup into main "container" pages. The idea is that the fragments may contain new (or new instances of) Dojo widgets. EWD automatically destroys any previously instantiated dojo widgets to ensure the new ones come in to a "clean" Dojo environment.
This works well except for a fragment containing an Accordion container and panes. In Firefox, the first time you bring in this fragment, it works perfectly. I then replace the innerHTML with some other markup and the accordion disappears and is destroyed - again this works perfectly. However if I now bring the accordion fragment in again, Firefox renders it perfectly (and allows me to interact with it perfectly) but the Firefox progress bar in the bottom right of the browser's status line never completes.
I've tried everything I can think of to work around whatever it is that's upsetting Firefox in this way. It's not a show-stopper as the accordion panes work just fine when loaded, but something is clearly upsetting Firefox. Having the progress bar not completing also gives the impression to users that they should wait, but it never completes.
For the record, here's the example markup in the fragment I'm testing:
<div dojoType="dijit.layout.AccordionContainer" id="myAcc" style="overflow:auto;height:300px;width:400px;">
<div dojoType="dijit.layout.AccordionPane" id="accordion23" selected="true" title="Pane 1">blah blah blah</div>
<div dojoType="dijit.layout.AccordionPane" id="accordion30" title="Pane 2">jgjg ggjg ghjgjg</div>
<div dojoType="dijit.layout.AccordionPane" id="accordion33" title="Pane 3">khkjh hkhkh hjkhkh hjkhh hkjhhkjk</div>
</div>
The fragment gets re-rendered by the following code that gets executed after this innerHTML is swapped into the container page:
dojo.require("dijit.layout.AccordionContainer");
// array of widgets that will need to be destroyed later
EWDdojo.widget=new Array();
EWDdojo.widget['myAcc']='';
EWDdojo.widget['accordion23']='';
EWDdojo.widget['accordion30']='';
EWDdojo.widget['accordion33']='';
// now reparse to render the fragment properly as Dojo
dojo.addOnLoad(function(){
dojo.parser.parse(dojo.byId('ewdthewholepage'));
});
and it's all cleaned up when you initiate another innerHTML swap by:
for (wid in EWDdojo.widget) { if (dijit.byId(wid)) dijit.byId(wid).destroy(); }
All other browsers behave impeccably - it's just an issue with Firefox.