diff options
author | Scott González <scott.gonzalez@gmail.com> | 2009-11-19 16:37:05 +0000 |
---|---|---|
committer | Scott González <scott.gonzalez@gmail.com> | 2009-11-19 16:37:05 +0000 |
commit | 3cc921dd3da81612a9fd9d33357d4a99ba4fd01e (patch) | |
tree | be2c01975e837391bf42ec0d484eaef52105d7c3 /ui | |
parent | 17829ce546c9349a4acac0c6d0c90d8dc6987987 (diff) | |
download | jquery-ui-3cc921dd3da81612a9fd9d33357d4a99ba4fd01e.tar.gz jquery-ui-3cc921dd3da81612a9fd9d33357d4a99ba4fd01e.zip |
Position: Changed document/window detection to be consistent with jQuery core.
Fixes a bug in IE7/8 where window == document.
Diffstat (limited to 'ui')
-rw-r--r-- | ui/jquery.ui.position.js | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/ui/jquery.ui.position.js b/ui/jquery.ui.position.js index 6c5250959..0b7563b10 100644 --- a/ui/jquery.ui.position.js +++ b/ui/jquery.ui.position.js @@ -29,11 +29,11 @@ $.fn.position = function(options) { targetHeight,
basePosition;
- if (options.of == document) {
+ if (options.of.nodeType === 9) {
targetWidth = target.width();
targetHeight = target.height();
basePosition = { top: 0, left: 0 };
- } else if (options.of == window) {
+ } else if ('scrollTo' in options.of && options.of.document) {
targetWidth = target.width();
targetHeight = target.height();
basePosition = { top: target.scrollTop(), left: target.scrollLeft() };
|