Ticket #5881 (closed defect: fixed)
[patch] [cla] Fix for cross window widget building in IE
| Reported by: | guest | Owned by: | bill |
|---|---|---|---|
| Priority: | normal | Milestone: | 1.2 |
| Component: | Dijit | Version: | 1.0 |
| Severity: | normal | Keywords: | Digit _Templated IE window setContext |
| Cc: | mike@…, ttrenka@…, alex@…, dustin@… |
Description (last modified by bill) (diff)
Problem: Opening a popup window in IE and trying to build widgets within in it via Dojo from the main (opener) window. Error Message: Interface not supported in IE 7 or obscure error code in IE6 Problem: IE cannot perform cross window DOM construction. In the current implementation, Dijit creates the node in the main document and tries to move it to the popup. Solution: Test that the temporary node used by _Templated is within the same document as the new widget.
The speed of Dijit rendering is important. I included a test is to measure the speed of widget creation.
This test also has a secondary purpose: The first is rendering a widget cross window in IE. While setting the context to the new window document was valid it wasn't sufficient - _Templated uses the same div to temporarilly hold the HTML during the creation of a widget. This fix checks if that temporary node is still within the current context and creates a new one if not. The second fix is if the widget was first created in the main page, and then created again in the popup window, adressing the cached status of the widget string. The only way (I could think of) to prform this test is to run the test a few times with the edits, and again without the edits. I added //IEFIX to _Templated so the two fixes could be switched out easily.
My personal tests showed a negligible difference rendering 1000 simple widgets.
Mike Wilcox mike@…