id,summary,reporter,owner,description,type,status,priority,milestone,component,version,resolution,keywords,cc,blocking,blockedby
4996,getBoundingClientRect causes 'Unspecified Error' in IE after ajax,chack7,,"In jQuery-1.3.2
Line 4176
Only occurs in IE

Reproduce details: Telerik RadTreeView recursed to set tree elements with droppable

Html text elements set to draggable

Works fine until the RadTreeView is updated with a ajax postback at which point, any attempt to drag and element results in 'Unspecified Error'

This does not occur in FireFox

Workaround: added the following modification


if ( document.documentElement[""getBoundingClientRect""] )
	jQuery.fn.offset = function() {
		if ( !this[0] ) return { top: 0, left: 0 };
		if ( this[0] === this[0].ownerDocument.body ) return jQuery.offset.bodyOffset( this[0] );
		
		// 2009-07-31: Added try catch to resolve error IE caused by ajax update of controls
		var box;
		try {
			box  = this[0].getBoundingClientRect();
		}
		catch(ex) {
			box = {top : 0, left: 0, right: 0, bottom: 0}
		}
		/////////////////////////////////////////////////////////////////////////////////////
		var doc = this[0].ownerDocument, body = doc.body, docElem = doc.documentElement,
			clientTop = docElem.clientTop || body.clientTop || 0, clientLeft = docElem.clientLeft || body.clientLeft || 0,
			top  = box.top  + (self.pageYOffset || jQuery.boxModel && docElem.scrollTop  || body.scrollTop ) - clientTop,
			left = box.left + (self.pageXOffset || jQuery.boxModel && docElem.scrollLeft || body.scrollLeft) - clientLeft;
		return { top: top, left: left };
	};

",bug,closed,major,1.4.3,offset,1.4.2,fixed,,,,
