Bug Tracker

Modify

Ticket #1397 (closed bug: wontfix)

Opened 6 years ago

Last modified 4 years ago

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:
Blocking: Blocked by:

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

comment:1 Changed 6 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 6 years ago by john

  • Owner changed from john to stefan
  • Component changed from core to interface

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 follow-up: ↓ 4 Changed 6 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 6 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 5 years ago by scott.gonzal

  • Status changed from new to closed
  • Resolution set to wontfix

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

Please follow the  bug reporting guidlines and use  jsFiddle when providing test cases and demonstrations instead of pasting the code in the ticket.

View

Add a comment

Modify Ticket

Action
as closed
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.