WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED DUPLICATE of
bug 234842
235840
[:has() pseudo-class] in combination with interactive pseudo-class can't be called twice
https://bugs.webkit.org/show_bug.cgi?id=235840
Summary
[:has() pseudo-class] in combination with interactive pseudo-class can't be c...
Jan Nicklas
Reported
2022-01-28 15:46:49 PST
Created
attachment 450282
[details]
Video of the Bug In Safari Technology Preview 139 the :has() selector does not seem to match correctly if the argument is an interactive pseudo-class with the universal selector e.g. :has(*:focus) and is used twice or more times. In the following example the form should receive a red border once an input has focus: <style> form:has(:focus) { background: rgb(255, 246, 167); } form:has(:focus):has(input:not(:focus)){ border: 1px solid red; } </style> <form> <input> <input> </form> I attached a video of the behaviour.
Attachments
Video of the Bug
(2.00 MB, image/gif)
2022-01-28 15:46 PST
,
Jan Nicklas
no flags
Details
View All
Add attachment
proposed patch, testcase, etc.
Radar WebKit Bug Importer
Comment 1
2022-02-04 15:47:18 PST
<
rdar://problem/88512104
>
Antti Koivisto
Comment 2
2022-02-04 22:48:37 PST
Works correctly with trunk (in form:has(:focus):has(input:not(:focus) the latter :has always matches since there is always an unfocused input in this tree). I think this was fixed after STP 139, maybe in
bug 234842
. *** This bug has been marked as a duplicate of
bug 234842
***
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug