]> source.dussan.org Git - jquery-ui.git/commitdiff
Position: Use a better check for determining if an object is a window. Fixes #6201...
authorScott González <scott.gonzalez@gmail.com>
Thu, 21 Oct 2010 03:47:17 +0000 (23:47 -0400)
committerScott González <scott.gonzalez@gmail.com>
Thu, 21 Oct 2010 03:47:17 +0000 (23:47 -0400)
ui/jquery.ui.position.js

index aa9881cffc816434c3bf15370f30a0f1bb292869..deacedbcc514c070f5231747ac4524c32349ea48 100644 (file)
@@ -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() };