r1268 - branches/dev/menu/ui
Author: paul.bakaus
Date: Mon Dec 29 07:15:20 2008
New Revision: 1268
Modified:
branches/dev/menu/ui/ui.core.position.js
Log:
positionAround: fixed issue with empty jQuery collection not empty on index
zero
Modified: branches/dev/menu/ui/ui.core.position.js
==============================================================================
--- branches/dev/menu/ui/ui.core.position.js (original)
+++ branches/dev/menu/ui/ui.core.position.js Mon Dec 29 07:15:20 2008
@@ -12,13 +12,13 @@
height = this[0].offsetHeight,
width = this[0].offsetWidth,
op = this.offsetParent(),
- sp = $(this.scrollParent()[0] || document.body),
+ sp = $(this.scrollParent().length ? this.scrollParent() :
document.body),
spBorderTop = parseInt(op.css('borderTopWidth'),10),
spBorderLeft= parseInt(op.css('borderLeftWidth'),10),
opBorderTop = parseInt(op.css('borderTopWidth'),10),
opBorderLeft= parseInt(op.css('borderLeftWidth'),10),
- opOffset = op.offset(),
- spOffset = sp.offset()
+ opOffset = op.offset()
+ //spOffset = sp.offset()
;
//Ugly fix for the issues of offset related to the body element