Bug 162057
Summary: | Content Blocker 'css-display-none' rules aren't applied when you open a website first time (from the address bar) | ||
---|---|---|---|
Product: | WebKit | Reporter: | Andrey Meshkov <am> |
Component: | WebKit Misc. | Assignee: | Nobody <webkit-unassigned> |
Status: | RESOLVED DUPLICATE | ||
Severity: | Major | CC: | achristensen, gsnedders, krzysztof.modras, mjs, rx100 |
Priority: | P2 | ||
Version: | Other | ||
Hardware: | Mac | ||
OS: | Other |
Andrey Meshkov
#### My configuration:
Safari Version 10.0 (12602.1.50.0.10)
macOS Sierra 10.12 (16A323)
#### Steps to reproduce
1. Register a simple content blocker:
```
[{ "trigger": { "url-filter": ".*" }, "action": { "type": "css-display-none", "selector": "body" } }]
```
2. Open a new tab
3. Enter "google.com" (or any other website) and press Enter
#### Expected result
Page is empty
#### Actual result
Page is not empty. The rule will be applied after you refresh the page.
Relevant bug reports:
https://github.com/AdguardTeam/AdguardBrowserExtension/issues/153
https://github.com/AdguardTeam/AdguardBrowserExtension/issues/359
Also there was a similar issue with searching from the address bar:
https://bugs.webkit.org/show_bug.cgi?id=153743
Attachments | ||
---|---|---|
Add attachment proposed patch, testcase, etc. |
Alex Christensen
rdar://27788755
Andrey Meshkov
Hi Alex!
Is there any update on this issue?
Is there anything I can do/provide that might help you?
rx100
I have the same problem = (
Andrey Meshkov
After all it appears that the bug is not that serious.
It exists only in case if "trigger" contains "resource-type" field:
```
[
{
"trigger": {
"url-filter": ".*",
"resource-type": ["document"]
},
"action": {
"type": "css-display-none",
"selector": "any selector"
}
}
]
```
Removing "resource-type" fixes the issue. This is still a bit weird, though.
Maciej Stachowiak
This is indeed pretty weird.
Sam Sneddon [:gsnedders]
*** This bug has been marked as a duplicate of bug 170707 ***