Bug Tracker

Ticket #2187 (closed bug: invalid)

Opened 11 months ago

Last modified 10 months ago

IE6/7 fails in "find" when selector isn't a String

Reported by: bfattori Assigned to: anonymous
Type: bug Priority: major
Milestone: 1.2.3 Component: core
Version: 1.2.2 Keywords: bug,IE7,IE7,find
Cc: Needs: Test Case

Description

When the selector passed to the "find" method (line 284 of 1.2.2 release) is not a String, the method ".indexOf" fails (line 289 of 1.2.2 release).

Wrapping the call as such seems to fix the problem:

... (selector.indexOf && selector.indexOf("..") > -1) ? ...

However, since I don't fully understand the way jQuery works, I don't know what this might break.

Attachments

Change History

Changed 11 months ago by davidserduke

What exactly are you trying to pass in to find that isn't a string?

I think find is only expecting a string:

http://docs.jquery.com/Traversing/find#expr

Changed 11 months ago by bfattori

I cannot tell which "find" method this is. There's an internal one, and one exposed to the outside. If this is the outside version, I'll dig deeper, but I believe this is the internal one.

Changed 11 months ago by davidserduke

I believe this is the external one jQuery.fn.find() which actually calls the internal one jQuery.find().

Changed 10 months ago by davidserduke

  • need changed from Review to Test Case

Do you have a test case that demonstrates your problem? I still don't understand what you are trying to pass in to find().

Changed 10 months ago by bfattori

I found the error. You may cancel this bug... I had implemented my own scroll animation handler that was passing an invalid object. With the new jQuery, scrolling is handled natively and removing my plugin fixed the issue.

Sorry for the trouble.

Changed 10 months ago by davidserduke

  • status changed from new to closed
  • resolution set to invalid

No problem at all. Glad you found your issue.

Note: See TracTickets for help on using tickets.