Opened 11 years ago
Closed 11 years ago
#10253 closed bug (invalid)
getWindow BUG in IE6-8
Reported by: | Owned by: | ||
---|---|---|---|
Priority: | low | Milestone: | None |
Component: | misc | Version: | 1.6.3 |
Keywords: | Cc: | ||
Blocked by: | Blocking: |
Description
jQ Ver: 1.5.x+; Browser: IE6/IE7/IE8;
Reproduce the issue: $(document).scrollLeft(); (than will be JavaScript-ERROR).
So use this method the Fancybox-Plugin (http://fancybox.googlecode.com/files/jquery.fancybox-1.3.4.zip)
The function getWindow under IE6-8 return not Window-Object. And scrollLeft and scrollTop methods don't work if elem is the document object.
Follow code fix it:
function getWindow( elem ) {
if(jQuery.isWindow( elem )){return elem;}
if(elem.nodeType !== 9){return false;}
var win= elem.defaultView | | elem.parentWindow;
return win.opener ? win : window;
}
Change History (1)
comment:1 Changed 11 years ago by
Component: | unfiled → misc |
---|---|
Priority: | undecided → low |
Resolution: | → invalid |
Status: | new → closed |
Note: See
TracTickets for help on using
tickets.
Thank you for submitting a ticket to the jQuery core bug tracker! Unfortunately, we are unable to assist with issues related to third party plugins (please also test your reported issue with jQuery edge to ensure this isn't an issue that's already been fixed).
For assistance with the plugin mentioned, please directly contact the plugin author, either via their GitHub account or the plugin site.
If they or you are able to reduce the issue experienced down to a problem with jQuery core that can be demonstrated outside of the plugin, we'll be happy to take another look at this.