I'm using script.aculo.us 1.7.1 beta 3 with prototype 1.5.1.1, and I've found a bug when I use draggables in Internet Explorer. If I modify the DOM tree and then try to drag an object, I get an "Unspecified Error" at line 3088 (in prototype.js version 1.5.1.1).
This works fine on other browsers like Firefox and Opera. I think the problem is that IE doesn't return null.
After searching for a solution, I came across this post (http://forums.asp.net/p/1038609/1444564.aspx) which suggests wrapping the offsetParent code in a try...catch block. So I tried it and my code now works in IE.
cumulativeOffset: function(element) {
var valueT = 0, valueL = 0;
try {
do {
valueT += element.offsetTop || 0;
valueL += element.offsetLeft || 0;
element = element.offsetParent;
} while (element);
}
catch( ex ) {
}
return [valueL, valueT];
},
I'm not sure if this is the best solution, but it seems like the simplest. :)
I suspect there are other places in the library that this fix could apply to as well.