Closed alexx7311 closed 8 months ago
@alexx7311
why does this happen?
When we rely on the nth-child
selector in the rules, and they count ancestors at the very top level (right after the body, like the header in the picture, which is hidden by the rule gismeteo.com##header.header.js-header:nth-child(5)
), such rules will break when we inject our iframe with information about filter updates (or version updates) because it is injected at the very first place, in the afterbegin
position.
In theory, we could change it to beforeend
, so it doesn't disrupt the operation of such nth-child
rules. On the other hand, it seems that there are extremely few such rules counting descendants from the root element in our filters (except for auto-generated rules through the browser assistant). And changing the position to put it at the very end might, in my opinion, provoke more problematic issues, so we won't be making changes right now.
AdGuard Extension version
4.2.241
Browser version
Chrome 121
OS version
Windows 11
What filters do you have enabled?
No response
What Stealth Mode options do you have enabled?
No response
Issue Details
STR:
Expected Behavior
User rules should work correctly after checking for filter updates and the blocked element shouldn't be displayed.
Screenshots
Screenshot 1:
Additional Information
No response