Opened 8 years ago

Closed 6 years ago

#14875 closed defect (wontfix)

not(*:first-child) query failing with selector=css3 (FF11/mac)

Reported by: bill Owned by: Kris Zyp
Priority: undecided Milestone: tbd
Component: Query Version: 1.7.2
Keywords: Cc:
Blocked By: Blocking:

Description

See dojo/tests/query/query.html?selector=css3. This fails:

dojo.query("#t span.foo:not(span:first-child)")

This slightly simplified query also fails:

dojo.query(".foo:not(span:first-child)")

with [Exception... "An invalid or illegal string was specified" code: "12" nsresult: "0x8053000c (NS_ERROR_DOM_SYNTAX_ERR)" location: "http://localhost/trunk/dojo/selector/lite.js Line: 72"] { constructor=DOMException, filename="http://localhost/trunk/dojo/selector/lite.js", code=12, more...}

Seems like that's valid CSS3 syntax?

Test is in dojo/tests/query/query.html; when this is fixed move it to CSS3 section of the file instead of ACME section.

Change History (4)

comment:1 Changed 7 years ago by bill

In [27986]:

Make better tests for new dojo/query module, refs #12451, #14874, #14875, #14876, #14877, #14879, #14880.

comment:2 Changed 6 years ago by Kris Zyp

Resolution: fixed
Status: newclosed

It looks like Firefox does not support this query. The lite engine is explicitly designed to rely on the browsers' query engine for anything beyond basic CSS2.1 queries, so we can't do anything more than that what the browser offers (clearly we won't build a whole query engine to deal with this issue).

comment:3 Changed 6 years ago by bill

Resolution: fixed
Status: closedreopened

There's no need to build a[nother] query engine when you already have acme and sizzle. But perhaps you meant that you don't want to add branching code to load acme for FF queries containing not(). So, I guess this should be marked as wontfix, or invalid if you document selector=css3 as not working for this case.

BTW I checked and the problem still occurs in the latest version of FF (version 22, mac).

comment:4 Changed 6 years ago by bill

Resolution: wontfix
Status: reopenedclosed
Note: See TracTickets for help on using tickets.