diff options
Diffstat (limited to 'resources/lib/jquery.ui/jquery.ui.position.js')
-rw-r--r-- | resources/lib/jquery.ui/jquery.ui.position.js | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/resources/lib/jquery.ui/jquery.ui.position.js b/resources/lib/jquery.ui/jquery.ui.position.js index be99013ef6c6..8023ae11aa23 100644 --- a/resources/lib/jquery.ui/jquery.ui.position.js +++ b/resources/lib/jquery.ui/jquery.ui.position.js @@ -68,9 +68,12 @@ $.position = { height: hasOverflowY ? $.position.scrollbarWidth() : 0 }; }, + isWindow: function( obj ) { + return obj != null && obj === obj.window; + }, getWithinInfo: function( element ) { var withinElement = $( element || window ), - isWindow = $.isWindow( withinElement[0] ); + isWindow = this.isWindow( withinElement[0] ); return { element: withinElement, isWindow: isWindow, @@ -103,7 +106,7 @@ $.fn.position = function( options ) { targetWidth = target.width(); targetHeight = target.height(); targetOffset = { top: 0, left: 0 }; - } else if ( $.isWindow( targetElem ) ) { + } else if ( $.position.isWindow( targetElem ) ) { targetWidth = target.width(); targetHeight = target.height(); targetOffset = { top: target.scrollTop(), left: target.scrollLeft() }; |