Skip to main content

Bug Tracker

Side navigation

#3167 closed bug (fixed)

Opened July 17, 2008 12:58PM UTC

Closed July 26, 2010 12:46AM UTC

z.indexOf is not a function

Reported by: hkirsman Owned by: flesler
Priority: minor Milestone: 1.3
Component: selector Version: 1.2.6
Keywords: select input Cc: hkirsman
Blocked by: Blocking:


a specific jquery select and form with name=name gives "z.indexOf is not a function" error

CURRENT WORKAROUND - add form in front of the query

Attachments (2)
  • bug.html (0.5 KB) - added by hkirsman July 17, 2008 12:59PM UTC.

    bug with selection of 'input type=text name=name '

  • jqselecttest.html (0.6 KB) - added by vlad August 01, 2008 05:52PM UTC.

    Demo of selector failing on an unrelated to the selection elements

Change History (7)

Changed July 17, 2008 01:12PM UTC by Markus.Staab comment:1

the input field in your testcase should have the name "blah", not name.

Changed July 22, 2008 01:37AM UTC by flesler comment:2

component: coreselector
need: PatchTest Case
resolution: → invalid
status: newclosed

Right, I'll close for now.

Reopen this if you modify the test case and it still fails.

Changed August 01, 2008 05:48PM UTC by vlad comment:3

resolution: invalid
status: closedreopened

Guys, thank you for the awesome library!

This specific bug hits me big time and as I deal with the code form other developers, which I have limited access to, it makes it worse.

See the attached bug file - it works without the form, while failing with the form. The query has nothing to do with the form! In my case, the form is someone else's code!

The way to debug the problem is the following (my page is huge, so can not do it by breakpoints):

In jquery-1.2.6.js, after the following text at lines 1709 - 1711:

  if ( z == null || /href|src|selected/.test(m[2]) )
    z = jQuery.attr(a,m[2]) || '';

Insert the debug catcher:

  if (z !== z.toString()) {
    z = z.toString();

Then, in the FireFox console, look for the elements $('.bug3167')

By the way, just brutally adding the line

  z = z.toString();

, instead of the debug catcher after line 1711, saves it from aborting on 1717 (now 1718). Now, I think it is OK in my environment, but getting a proper fix would make me much more willing to release the code to production.

Changed August 06, 2008 03:21PM UTC by flesler comment:4

cc: → hkirsman, flesler
owner: → flesler
status: reopenednew

Yes, I think I saw this on another ticket. I pulled out the perfect solution, but it hits perfomance.

Will handle this once I get a while.

Changed August 06, 2008 03:21PM UTC by flesler comment:5

cc: hkirsman, fleslerhkirsman
status: newassigned

Changed December 26, 2008 09:35PM UTC by vlad comment:6

I have mentioned this bug in the 1.3b1 bug #3753. Both bugs work off of the same test case but address different problems.

Changed July 26, 2010 12:46AM UTC by dmethvin comment:7

resolution: → fixed
status: assignedclosed

Test case does not throw an error with 1.3 or 1.4.