From 9bb51d308e0a72bc67db948e92345c826a8f724d Mon Sep 17 00:00:00 2001 From: Scott González Date: Thu, 24 Jul 2014 15:29:40 -0400 Subject: Position: Support positioning within document with jQuery 1.6.x Fixes #10071 Closes gh-1294 --- ui/position.js | 7 +++++-- 1 file 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() }; } }; -- cgit v1.2.3