Behavior of dispatchEvent method had changed in Firefox 1.0.5 causing JS exception and column resize problems in the grid control:
Error: [Exception... "Component returned failure code: 0x80070057
(NS_ERROR_ILLEGAL_VALUE) [nsIDOMEventTarget.dispatchEvent]"
nsresult: "0x80070057 (NS_ERROR_ILLEGAL_VALUE)" location: "JS
frame :: .../runtime/lib/browsers/gecko.js :: anonymous :: line ..." data: no]
Source File: .../runtime/lib/browsers/gecko.js Line: ...
Add the following code to your scripts to fix the problem:
if (window.HTMLElement) {
var element = HTMLElement.prototype;
var capture = ["click", "mousedown", "mouseup", "mousemove", "mouseover", "mouseout" ];
element.setCapture = function(){
var self = this;
var flag = false;
this._capture = function(e){
if (flag) {return}
flag = true;
var event = document.createEvent("MouseEvents");
event.initMouseEvent(e.type,
e.bubbles, e.cancelable, e.view, e.detail,
e.screenX, e.screenY, e.clientX, e.clientY,
e.ctrlKey, e.altKey, e.shiftKey, e.metaKey,
e.button, e.relatedTarget);
self.dispatchEvent(event);
flag = false;
};
for (var i=0; i<capture.length; i++) {
window.addEventListener(capture[i], this._capture, true);
}
};
element.releaseCapture = function(){
for (var i=0; i<capture.length; i++) {
window.removeEventListener(capture[i], this._capture, true);
}
this._capture = null;
};
}