cluettr
6 Jul 2007, 2:59 PM
I'm reporting this here because it looks as if this is the third such post regarding IE crashing on b=el.getBoundingClientRect(). I'm not 100% sure that this is a bug but here are the other posts.
http://extjs.com/forum/showthread.php?p=34093
http://extjs.com/forum/showthread.php?t=7013
It does look as if the two posts reference a similar issue and are posted after the March release of beta 2.
How I came across this:
I have a span which is assigned the id associated with a dialog. When clicking this dialog it opens without issue. When clicking a second time it also opens without issue. When removing and then re-adding the spans container div via an ajax request and then attempting to open the dialog it fails pointing to ext-base.js and the line b=el.getBoundingClientRect()
Here is some code which may help:
My simple dialog:
var dialogUpload = function(){
var dialog, showBtn;
// return a public interface
return {
init : function(){
showBtn = Ext.get('dialog-upload');
// attach to click event
showBtn.on('click', this.showDialog, this);
},
showDialog : function(){
if(!dialog){ // lazy initialize the dialog and only create it once
dialog = new Ext.BasicDialog("vendor_upload", {
autoTabs:true,
width:500,
height:300,
shadow:true,
minWidth:300,
minHeight:250,
proxyDrag: true
});
dialog.addKeyListener(27, dialog.hide, dialog);
dialog.addButton('Submit', dialog.hide, dialog).disable();
dialog.addButton('Close', dialog.hide, dialog);
}
dialog.show(showBtn.dom);
},
exists : function(){
if(dialog) { return true; }
else {return false; }
}
};
}();
The span I am using to generate the dialog (partial code):
<span id="dialog-upload" onmouseover="this.style.cursor='hand';">Import</span>
PHP code which contains the script above. This is also used to repopulate the containing span with the code specified above using an Ajax request. It is after that Ajax request that the error appears when trying to open the dialog again:
<? $show = 1; if ($show == 1 && $access_class_value >= RESTRICTED) { ?> <span id='menu_top'><? include ("panel_tc_menu_default.php"); ?></span> <? } ?>
http://extjs.com/forum/showthread.php?p=34093
http://extjs.com/forum/showthread.php?t=7013
It does look as if the two posts reference a similar issue and are posted after the March release of beta 2.
How I came across this:
I have a span which is assigned the id associated with a dialog. When clicking this dialog it opens without issue. When clicking a second time it also opens without issue. When removing and then re-adding the spans container div via an ajax request and then attempting to open the dialog it fails pointing to ext-base.js and the line b=el.getBoundingClientRect()
Here is some code which may help:
My simple dialog:
var dialogUpload = function(){
var dialog, showBtn;
// return a public interface
return {
init : function(){
showBtn = Ext.get('dialog-upload');
// attach to click event
showBtn.on('click', this.showDialog, this);
},
showDialog : function(){
if(!dialog){ // lazy initialize the dialog and only create it once
dialog = new Ext.BasicDialog("vendor_upload", {
autoTabs:true,
width:500,
height:300,
shadow:true,
minWidth:300,
minHeight:250,
proxyDrag: true
});
dialog.addKeyListener(27, dialog.hide, dialog);
dialog.addButton('Submit', dialog.hide, dialog).disable();
dialog.addButton('Close', dialog.hide, dialog);
}
dialog.show(showBtn.dom);
},
exists : function(){
if(dialog) { return true; }
else {return false; }
}
};
}();
The span I am using to generate the dialog (partial code):
<span id="dialog-upload" onmouseover="this.style.cursor='hand';">Import</span>
PHP code which contains the script above. This is also used to repopulate the containing span with the code specified above using an Ajax request. It is after that Ajax request that the error appears when trying to open the dialog again:
<? $show = 1; if ($show == 1 && $access_class_value >= RESTRICTED) { ?> <span id='menu_top'><? include ("panel_tc_menu_default.php"); ?></span> <? } ?>