New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 640959 link

Starred by 1 user

Issue metadata

Status: Duplicate
Merged: issue 580628
Owner: ----
Closed: Sep 2016
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Windows , Mac
Pri: 3
Type: Feature



Sign in to add a comment

querySelectorAll fails on this query: [data-name="xxx"]:not([data-name] [data-name])

Reported by nehue...@gmail.com, Aug 25 2016

Issue description

Chrome Version       : Versión 49.0.2623.87 (64-bit)
URLs (if applicable) : ??
Other browsers tested: ??
  Add OK or FAIL, along with the version, after other browsers where you
have tested this issue:
     Safari: ??
    Firefox: ??
         IE: ??

What steps will reproduce the problem?
(1) Open console
(2) run: document.querySelectorAll('[data-name="xxx"]:not([data-name] [data-name])')
(3) 

What is the expected result?
See the elements that have attribute data-name="xxx" and has no parent with attribute name defined.

What happens instead?
Uncaught DOMException: Failed to execute ... is not a valid selector.

Please provide any additional information below. Attach a screenshot if
possible.

 
Cc: tkonch...@chromium.org
Labels: -Pri-3 M-54 OS-Mac OS-Windows Pri-2
Status: Untriaged (was: Unconfirmed)
Able to reproduce the issue on mac 10.11.6 chrome version 52.0.2743.116 and canary - observed Uncaught DOMException

Please find the screenshot

This is seen in win as well

Firefox behavior : syntax error was displayed as shown in the screenshot
Chrome.png
90.5 KB View Download
FF.png
80.7 KB View Download
The issue can be seen from M35 35.0.1853.0 to latest canary. Hence can be considered a non regression issue

Components: Blink>DOM

Comment 5 by nehue...@gmail.com, Aug 29 2016

Same thing with: 
- document.querySelectorAll('.foo:not(#foo .foo)')
- document.querySelectorAll('.foo:not(.foo .foo)')
- document.querySelectorAll('#foo:not(.foo .foo)')
- document.querySelectorAll('.foo:not(#foo > .foo)')
- document.querySelectorAll('.foo:not(.foo > .foo)')
- document.querySelectorAll('#foo:not(.foo > .foo)')

and other while inside of :not(...) has an nested rule.

Comment 6 by tkent@chromium.org, Sep 15 2016

Components: -Blink>DOM Blink>CSS
Labels: -Type-Bug -Pri-2 Pri-3 Type-Feature
Edge also throws an error.

Probably, the following one:
https://drafts.csswg.org/selectors-4/#negation
> Note: In Selectors Level 3, only a single simple selector was allowed as the argument to :not().

Comment 7 by r...@opera.com, Sep 16 2016

Mergedinto: 580628
Status: Duplicate (was: Untriaged)

Sign in to add a comment