Bug Tracker

Opened 13 years ago

Closed 12 years ago

Last modified 11 years ago

#1397 closed bug (wontfix)

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.

Change History (5)

comment:1 Changed 13 years ago by himynameizna

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.

comment:2 Changed 13 years ago by john

Component: coreinterface
Owner: changed from john to 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.

comment:3 Changed 13 years ago by 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); }

comment:4 in reply to:  3 Changed 13 years ago by bzzzik

Replying to 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);

comment:5 Changed 12 years ago by scott.gonzal

Resolution: wontfix
Status: newclosed

Interface is no longer supported; consider switching to jQuery UI.

Note: See TracTickets for help on using tickets.