Changeset 3473

Show
Ignore:
Timestamp:
11/19/09 08:37:05 (4 months ago)
Author:
scott.gonzalez
Message:

Position: Changed document/window detection to be consistent with jQuery core.

Fixes a bug in IE7/8 where window == document.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/ui/jquery.ui.position.js

    r3243 r3473  
    3030                basePosition; 
    3131 
    32         if (options.of == document) { 
     32        if (options.of.nodeType === 9) { 
    3333                targetWidth = target.width(); 
    3434                targetHeight = target.height(); 
    3535                basePosition = { top: 0, left: 0 }; 
    36         } else if (options.of == window) { 
     36        } else if ('scrollTo' in options.of && options.of.document) { 
    3737                targetWidth = target.width(); 
    3838                targetHeight = target.height();