diff --git a/ui/jquery.ui.position.js b/ui/jquery.ui.position.js index aa9881cffc..deacedbcc5 100644 --- a/ui/jquery.ui.position.js +++ b/ui/jquery.ui.position.js @@ -37,7 +37,8 @@ $.fn.position = function( options ) { targetWidth = target.width(); targetHeight = target.height(); basePosition = { top: 0, left: 0 }; - } else if ( targetElem.scrollTo && targetElem.document ) { + // TODO: use $.isWindow() in 1.9 + } else if ( targetElem.setTimeout ) { targetWidth = target.width(); targetHeight = target.height(); basePosition = { top: target.scrollTop(), left: target.scrollLeft() };