New issue
Advanced search Search tips

Issue 914917 link

Starred by 1 user

Issue metadata

Status: WontFix
Owner: ----
Closed: Dec 15
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Mac
Pri: 2
Type: Bug



Sign in to add a comment

negation selector with both type and and subclass selector returns exception

Reported by daniel.y...@gmail.com, Dec 13

Issue description

UserAgent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.110 Safari/537.36

Steps to reproduce the problem:
1. Open devtools console.
2. Enter: $(":not(label.selected)")
3. Press return.

What is the expected behavior?
Returns undefined or an element.

What went wrong?
Throws exception:

Uncaught DOMException: Failed to execute 'closest' on 'Element': ':not(label.selected)' is not a valid selector.

Did this work before? N/A 

Does this work in other browsers? Yes

Chrome version: 70.0.3538.110  Channel: n/a
OS Version: OS X 10.13.6
Flash Version: 

This worked in Safari. Did not try in any other browser.
 
Labels: Needs-Triage-M70
Chrome matches CSS Selectors Level 3 specification:
https://www.w3.org/TR/selectors-3/#negation

    The negation pseudo-class, :not(X), is a functional notation taking 
    a simple selector [...] as an argument.

    A simple selector is ***either*** [emphasis mine] a type selector, 
    universal selector, attribute selector, class selector, ID selector,
    or pseudo-class.

Safari apparently implemented the [subset of] Level 4, which is not yet finalized.
Status: WontFix (was: Unconfirmed)
Closing as per comment 2.

Sign in to add a comment