Side navigation
#1397 closed bug (wontfix)
Opened July 13, 2007 11:43PM UTC
Closed March 31, 2008 01:46AM UTC
Last modified August 11, 2009 12:57PM UTC
jQuery.fn.find() breaks in IE when passed a DOM node (related to Interface Slider being broken)
Reported by: | himynameiznate | Owned by: | stefan |
---|---|---|---|
Priority: | major | Milestone: | 1.1.4 |
Component: | interface | Version: | 1.1.3 |
Keywords: | Cc: | ||
Blocked by: | Blocking: |
Description
jQuery 1.1.3 breaks in IE when you pass .find() a DOM node instead of just a string.
The error in IE is the ubiquitous "Object does not support this property or method".
I set up a test page for you to test against here: http://alterform.com/jquery/dev/jquery_find.html
Basically, this works:
var ul = jQuery('ul');
ul.find('li:first');
But this does not:
ul.find(ul[0].childNodes[1]); //ignore the childNode index.
Attachments (0)
Change History (5)
Changed July 13, 2007 11:46PM UTC by comment:1
Changed July 15, 2007 03:35PM UTC by comment:2
component: | core → interface |
---|---|
owner: | john → stefan |
This sounds like an issue with Interface - since .find() was never designed to be able to take a DOM Node (which is why it's failing). Reassigning.
Changed July 30, 2007 05:02AM UTC by comment:3
This is how I fixed it:
in interface's idrag.js remove the line
var dhe = o.handle ? jQuery(this).find(o.handle) : jQuery(this);
and replace it with
if (jQuery.browser.msie) { var dhe=$(o.handle); }
else { var dhe = o.handle ? jQuery(this).find(o.handle) : jQuery(this); }
Changed July 30, 2007 10:03AM UTC by comment:4
Replying to [comment:3 djdula]:
This is how I fixed it: in interface's idrag.js remove the line var dhe = o.handle ? jQuery(this).find(o.handle) : jQuery(this); and replace it with if (jQuery.browser.msie) { var dhe=$(o.handle); } else { var dhe = o.handle ? jQuery(this).find(o.handle) : jQuery(this); }
i think, it's better to replace with:
var dhe = o.handle ? jQuery(o.handle, this) : jQuery(this);
By the way, this relates to the Interface Slider component because the Drag component (which slider uses) relies on being able to pass a DOM node to find.