Side navigation
#10253 closed bug (invalid)
Opened September 12, 2011 10:08AM UTC
Closed September 12, 2011 11:03AM UTC
getWindow BUG in IE6-8
Reported by: | biodiscus@gmail.com | 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;
}
Attachments (0)
Change History (1)
Changed September 12, 2011 11:03AM UTC by comment:1
component: | unfiled → misc |
---|---|
priority: | undecided → low |
resolution: | → invalid |
status: | new → closed |
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.