Using version 9.2.20092.2025 (also tested in 8.2) and FireFox 3.6
Anytime I try to sort or basically anything with JavaScript I get the error:
Error: document.getBoxObjectFor is not a function
And the section in the source file looks like this:
else if (ig_csom.IsFireFox && document.getBoxObjectFor(elem)) { var rect = document.getBoxObjectFor(elem); r.x = rect.x; r.y = rect.y; r.w = rect.width; r.h = rect.height; }
Can anyone else confirm this?
Basically the grid is completely broken in this new version of FireFox.
Looks like the Infragistics grid was using a deprecated function. For a quick fix, add the following snippet to your page(s) or a javascript file (i'll probably extend it later to behave exactly like the missing function):
if (!document.getBoxObjectFor) { document.getBoxObjectFor = function(el) { var b = el.getBoundingClientRect(); return { x: b.left, y: b.top, width: b.width, height: b.height }; }; }
Ok, here's the improved version of the document.getBoxObjectFor function:
if (!document.getBoxObjectFor) { document.getBoxObjectFor = function(el) { if (!(el instanceof HTMLElement)) { return; } //else: var b = el.getBoundingClientRect(), p = el, x = sx = b.left - el.offsetLeft, y = sy = b.top - el.offsetTop, w = window; while (!(p instanceof HTMLHtmlElement)) { sx += p.scrollLeft; sy += p.scrollTop; p = p.parentNode; } return { x: sx, y: sy, width: Math.round(b.width), height: Math.round(b.height), element: el, firstChild: el, lastChild: el, previousSibling: null, nextSibling: null, parentBox: el.parentNode, screenX: x + w.screenX + (w.outerWidth - w.innerWidth) / 2, screenY: y + w.screenY + (w.outerHeight - w.innerHeight) / 2 }; }; }
Although it's working reasonably well, it's not a perfect replacement. Namely, the screenX and screenY properties are only approximations, which isn't really a problem because it doesn't look like the IG controls are using them anywhere. Furthermore, it doesn't work if the element is not displayed, whereas the original function would always return the element's position as if it were visible. Shouldn't be a problem, either.
Please tell me if you encounter any problems with this.