diff options
-rw-r--r-- | ui/position.js | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/ui/position.js b/ui/position.js index 53e5a1d9d..09bc4fe2b 100644 --- a/ui/position.js +++ b/ui/position.js @@ -123,8 +123,11 @@ $.position = { offset: withinElement.offset() || { left: 0, top: 0 }, scrollLeft: withinElement.scrollLeft(), scrollTop: withinElement.scrollTop(), - width: isWindow ? withinElement.width() : withinElement.outerWidth(), - height: isWindow ? withinElement.height() : withinElement.outerHeight() + + // support: jQuery 1.6.x + // jQuery 1.6 doesn't support .outerWidth/Height() on documents or windows + width: isWindow || isDocument ? withinElement.width() : withinElement.outerWidth(), + height: isWindow || isDocument ? withinElement.height() : withinElement.outerHeight() }; } }; |