Opened 14 years ago

Closed 14 years ago

Last modified 12 years ago

#4057 closed defect (fixed)

Menu - 2 seconds delay to open submenu and showing hour glass (both IE6)

Reported by: guest Owned by: bill
Priority: high Milestone: 0.9
Component: Dijit Version: 0.9
Keywords: Cc:
Blocked By: Blocking:



On IE6: When opening a submenu it takes about 2 seconds to open the new layer. It is also showing a hour glass when opening a menulayer.

A ugly workaround is to place the following code in dijit.BackgroundIframe?:

if (!dojo.byId("BackgroundIframe_Waiting_Preventer")) {

var tmp_link = document.createElement("a");
tmp_link.href = "javascript:"; = "BackgroundIframe_Waiting_Preventer";
document.body.appendChild(tmp_link);; = "none";


so dijit.BackgroundIframe? looks like:

dijit.BackgroundIframe? = function(/* HTMLElement */node){

summary: For IE z-index schenanigans. id attribute is required. description: new dijit.BackgroundIframe?(node) Makes a background iframe as a child of node, that fills area (and position) of node

if(!{ throw new Error("no id"); }

if((dojo.isIE && dojo.isIE < 7)
(dojo.isFF && dojo.isFF < 3 && dojo.hasClass(dojo.body(), "dijit_a11y"))){

var iframe;

if (!dojo.byId("BackgroundIframe_Waiting_Preventer")) {

var tmp_link = document.createElement("a");

tmp_link.href = "javascript:"; = "BackgroundIframe_Waiting_Preventer"; document.body.appendChild(tmp_link);; = "none";


var html="<iframe src='javascript:""'"

+ " style='position: absolute; left: 0px; top: 0px;" + " width: expression(document.getElementById("" + + "").offsetWidth);" + " height: expression(document.getElementById("" + + "").offsetHeight); " + "z-index: -1; filter:Alpha(Opacity="0");'>";

iframe = dojo.doc.createElement(html);


iframe = dojo.doc.createElement("iframe");

iframe.src = 'javascript:""'; iframe.className = "dijitBackgroundIframe";

} iframe.tabIndex = -1; Magic to prevent iframe from getting focus on tab keypress - as style didnt work. node.appendChild(iframe); this.iframe = iframe;



Change History (5)

comment:1 Changed 14 years ago by bill

Milestone: 0.9
Owner: set to bill

Hmm, the backgroundIframe is causing the delay? I was supposing it was from IE Developer Toolbar. OK, thanks for the info. probably we can cache background iframes then... Not sure what your code above is doing exactly. if(dojo.isIE){...}else{...} There should be no else block because we don't create iframes except for IE6.

comment:2 Changed 14 years ago by guest

I came up to this this solution by inserting a link with href="javascript:" in

If you first click the 'javascript:' link, there is no more delay. In dijit.BackgroundIframe? I create and click this link programmaticly.

The if(dojo.isIE){...}else{...} preexists in the dijit/_base/popup.js (from line 186)

comment:3 Changed 14 years ago by guest

Bill, you're right. Delay only occurs with installed IE Developer Toolbar. Just tested.

comment:4 Changed 14 years ago by bill

Resolution: fixed
Status: newclosed

(In [10099]) Fixes #4057: cache BackgroundIframes? to prevent 2s delay on IE6.

comment:5 Changed 12 years ago by bill

(In [16540]) Fixes #8561: Visible IFRAMEs when using Dijits on IE6

I removed the code to pre-create a background iframe on IE6 on page load. This code was added in [10099] (refs #4057) to prevent a 2s delay on IE6 showing the first popup, but I'm not seeing that problem anymore, and the code is questionable anyway since it slows down page load time.

Note: See TracTickets for help on using tickets.