Bug 151702 - Content Blocker does not apply "css-display-none" rules when page is loaded in non-active tab
Summary: Content Blocker does not apply "css-display-none" rules when page is loaded i...
Status: RESOLVED INVALID
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKit Misc. (show other bugs)
Version: Safari 9
Hardware: All iOS 9.0
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-12-01 02:57 PST by Andrey Meshkov
Modified: 2020-02-19 03:31 PST (History)
4 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Andrey Meshkov 2015-12-01 02:57:12 PST
Steps to reproduce (tested on ipad mini 2):

1. Register a simple content blocker with one rule (hiding "share" buttons on macrumors.com)
[{trigger: {url-filter: ".*", resource-type: ["document"], if-domain: ["*macrumors.com"]}, action: {type: "css-display-none", selector: ".social"}}]
2. Open macrumors.com. Share buttons are hidden http://screencast.com/t/88mfI2UM
3. Tap on the article header and select "Open in New Tab"
4. Wait a bit then switch to that new tab

Expected result:
Share buttons should be hidden

Real result:
Share buttons block is visible
The block will be hidden if you refresh the page
Comment 1 Andrey Meshkov 2020-01-29 01:59:53 PST
The issue is still there.

Here's an easier way to reproduce:

1. Register a simple content blocker with one rule (hiding "share" buttons on macrumors.com)
[{trigger: {url-filter: ".*", if-domain: ["*iana.org"]}, action: {type: "css-display-none", selector: "body"}}]
2. Open example.org
3. Cmd+Click on the "More information..." link
4. Wait a bit then switch to the IANA tab


Expected result:
The page content is hidden

Actual result:
Nothing is hidden, you need to refresh the page for the rules to be applied
Comment 2 Maciej Stachowiak 2020-02-19 02:40:30 PST
Strange that opening in a background tab would have an effect.
Comment 3 Andrey Meshkov 2020-02-19 03:31:51 PST
Huh, it seems that this issue is invalid after all.

Most likely I've not waited enough for a content blocker to be compiled and applied.