Intermittent incorrect border panel layout on Firefox - suggested fix
Intermittent incorrect border panel layout on Firefox - suggested fix
Hi,
I've come across a problem where pages are intermittently displaying incorrectly on Firefox (3.6.8). I've tracked this down to clientWidth apparently reporting an incorrect value when rendering the Ext.Panel with a "border" layout. I say apparently, because what actually appears to be happening is that the script is occasionally running before the CSS has been applied (and so the reported clientWidth is actually correct - unexpected, but correct).
I'm using the following script as a work-around. (I've only tested it on Firefox 3.6.)
(function() {
if (!Ext.isGecko){
return;
}
// Extracted from \cvs\fproot\fp\shared\ext-2.2\source\core\EventManager.js
// and then trimmed for Firefox only.
var docReadyEvent, docReadyState = false;
var initDocReady = function(){
docReadyEvent = new Ext.util.Event();
document.addEventListener("DOMContentLoaded", fireDocReady, false);
Ext.lib.Event.on(window, "load", fireDocReady);
};
I don't know if this has been documented somewhere else or not. If there's a better solution, then please let me know. No doubt someone will point out a simple config flag somewhere that solves the problem...
Cheers,
- Lee
Last edited by L33ch; 24 Aug 2010 at 1:49 PM.
Reason: Fix to script.