Closed theKashey closed 7 months ago
I'd love to see this pulled soon! This issue has had me struggling for a few days
@theKashey I will first check if hooking the RegExp to start "^" and to the end "$" could solve the problem. In the case this doesn't work I will bend to the above alternative, thus rearranging the checking order.
According to stack overflow ^
will enforce longest-match, so please try
The original fix was reverted due to https://github.com/dperini/nwsapi/issues/80 From my own experiments, changing order is enough to greatly improve behaviour without capability of introducing loops.
Any chance this can be reevaluated? Would love to see this bug fixed!
@dospunk Sure ... I am all for it. I thought this was fixed with the reordering of the user actions pseudo-class strings.. Can you please help and update me with a failing ":focus-within" test case that I can start with ?
@dperini My bad, it does seem to be working now!
If there are comments about this working, should this issue be closed? I stumbled upon it from https://github.com/jsdom/jsdom/issues/3359
The order is now correct. Not sure why this PR has't been marked as conflicted
.
Currently a style with
:focus-within
ends as:focus
+-within
generating incorrect ruleThe code before was producing for something like
something like
Where
e.nodeName.toLowerCase()=="focus"
is definitely not what expected