[Webkit-unassigned] [Bug 239868] New: [:has() pseudo-class] is flaky when passing a selector that contains :empty

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Thu Apr 28 13:30:09 PDT 2022


https://bugs.webkit.org/show_bug.cgi?id=239868

            Bug ID: 239868
           Summary: [:has() pseudo-class] is flaky when passing a selector
                    that contains :empty
           Product: WebKit
           Version: Safari 15
          Hardware: All
                OS: All
            Status: NEW
          Severity: Normal
          Priority: P2
         Component: CSS
          Assignee: webkit-unassigned at lists.webkit.org
          Reporter: brsil at microsoft.com

Created attachment 458545

  --> https://bugs.webkit.org/attachment.cgi?id=458545&action=review

Test page showing the issue where :has() is not triggering a update

While using the pseudo class selector :has() in combination with the ::after pseudo-element and passing a selector to the :has that contains the :empty pseudo class I get a flaky behavior where making a change that would make the selector passed to the :has() be invalid does not actually invalidate the selector that has the :has() resulting in a flaky behavior.

To see the behavior in action on the attached test page do the following steps:
1. Click on the add child button
   1.1. You should see a child that is not empty and has a random number or,
   1.2. A child that has no content and the text "::after text" is displayed from the ::after element on the parent
2. If you got a empty child now click on the add text button

Expected:
The child is now not empty therefore the selector ".parent:has(.child:only-child:empty)::after" is invalid and the "::after text" should disappear from the parent element

Currently:
The "::after text" is still present on the parent and has no selector matching it

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20220428/bc1610d0/attachment.htm>


More information about the webkit-unassigned mailing list