mirror of
https://github.com/jquery/jquery-ui.git
synced 2024-11-21 11:04:24 +00:00
Position: Changed document/window detection to be consistent with jQuery core.
Fixes a bug in IE7/8 where window == document.
This commit is contained in:
parent
17829ce546
commit
3cc921dd3d
4
ui/jquery.ui.position.js
vendored
4
ui/jquery.ui.position.js
vendored
@ -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() };
|
||||
|
Loading…
Reference in New Issue
Block a user