Bug Tracker


Ticket #1348 (closed bug: fixed)

Opened 7 years ago

Last modified 7 years ago

Error with [@foo$=bar] selector

Reported by: sidebog7 Owned by:
Priority: major Milestone: 1.1.4
Component: core Version: 1.1.3
Keywords: Cc:
Blocking: Blocked by:


If the selector you attempt to use scans for attributes that don't exist (e.g. $('div[@test$=end]') and there exists dividers without a test attribute) jquery throws a z has no properties error. This appears to come from the following lines

if ((type == "" && !!z type == "=" && z == m[5]type == "!=" && z != m[5]type == "=" && z && !z.indexOf(m[5]) type == "$=" && z.substr(z.length - m[5].length) == m[5](type == "*="
type == "~=") && z.indexOf(m[5]) >= 0) not )

tmp.push( a );

Where = checks z (&& z &&) whereas $= (and *= and ~=) assumes it is valid.

Change History

comment:1 Changed 7 years ago by john

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

Fixed in SVN.

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


Add a comment

Modify Ticket

as closed

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

Note: See TracTickets for help on using tickets.