Opened on 10/13/2015 at 03:42:09 PM

Closed on 08/29/2017 at 02:14:21 PM

Last modified on 07/28/2018 at 12:46:57 AM

#3200 closed defect (fixed)

Element hiding not applied to page preloaded by Safari when typing URL

Reported by: arthur Assignee: mjethani
Priority: P2 Milestone: Adblock-Plus-1.12.5-for-Safari
Module: Platform Keywords:
Cc: mario, greiner, sebastian Blocked By:
Blocking: Platform: Safari
Ready: yes Confidential: no
Tester: Unknown Verified working: yes
Review URL(s):

Description (last modified by greiner)


  • Safari 9.0 (10601.1.56.2)
  • OS X Yosemite 10.10.5
  • MacBook Pro
  • Adblock Plus 1.9.3
  • EasyList Germany+EasyList

How to reproduce

  1. Add the custom filter ##body
  2. Open a new tab and navigate to a website
  3. Repeat the previous step
  4. Reload the last tab

Observed behaviour

Page body hidden in step 2 and step 4 but visible in step 3.

Expected behaviour

Page body should be hidden in steps 2 to 4.

Notes for testing

Make sure to use a different site on each try because as soon as a URL is entered once it will be remembered even after browser restarts.


Safari preloads previously visited URLs when it is chosen as the top result on typing into the addressbar. Those page loads are not affected by our extension. Disabling "Preload Top Hit in the background" in Safari's preferences should fix this issue but we need to work around that in the extension.

Attachments (0)

Change History (14)

comment:1 Changed on 10/15/2015 at 11:00:25 AM by sebastian

  • Cc greiner sebastian added
  • Owner sebastian deleted

I talked to greiner. He will look into this.

comment:2 Changed on 10/15/2015 at 01:40:56 PM by greiner

  • Summary changed from Element hiding broken in Safari 9 to Element hiding not applied when switching of Acceptable Ads in Safari 9

I tried to reproduce it with the following setup:

Mac OSX 10.11 Beta
Safari 9.0
Adblock Plus 1.9.3
EasyList Germany+EasyList

There was no indication to me that element hiding wasn't working. What I can imagine is that Safari is heavily caching pages (even after a browser restart) which would explain why reloading the tab resolves the issue.

comment:3 Changed on 10/16/2015 at 10:08:21 AM by greiner

  • Description modified (diff)
  • Summary changed from Element hiding not applied when switching of Acceptable Ads in Safari 9 to Element hiding not applied to page preloaded by Safari when typing URL

The issue appears to be caused by Safari preloading the URL that it suggests when typing in the addressbar. A confirmed workaround for this is unchecking "Preload Top Hit in the background" in the Safari preferences.

I updated the ticket accordingly.

comment:4 Changed on 10/16/2015 at 10:08:44 AM by greiner

  • Component changed from Unknown to Platform

comment:5 Changed on 10/16/2015 at 10:13:30 AM by sebastian

I still wonder why that is. Note that we already address preloaded tabs, by relying on content scripts rather than using the Windows and Tabs API on Safari. Might it be that there is a bug in Safari 9 that content scripts don't run in preloaded tabs anymore? OTherwise, could you spot any JavaScript error in the global page or content script?

comment:6 Changed on 10/21/2015 at 12:20:52 PM by arthur

It seems this also causes the "Block element" menu to disappear.

comment:7 Changed on 10/21/2015 at 12:22:28 PM by greiner

  • Description modified (diff)

comment:8 Changed on 10/21/2015 at 04:56:07 PM by sebastian

  • Priority changed from Unknown to P2
  • Ready set

comment:9 Changed on 05/11/2017 at 07:08:50 PM by mjethani

  • Owner set to mjethani

comment:10 Changed on 05/11/2017 at 07:16:52 PM by mjethani

  • Review URL(s) modified (diff)
  • Status changed from new to reviewing

comment:11 Changed on 08/29/2017 at 02:13:18 PM by abpbot

A commit referencing this issue has landed:
Issue 3200 - Delay initialization for prerendered documents

comment:12 Changed on 08/29/2017 at 02:14:21 PM by mjethani

  • Resolution set to fixed
  • Status changed from reviewing to closed

comment:13 Changed on 09/27/2017 at 05:31:01 PM by sebastian

  • Milestone set to Adblock-Plus-for-Safari-next

comment:14 Changed on 07/28/2018 at 12:46:57 AM by traynard

  • Verified working set

Add Comment

Modify Ticket

Change Properties
as closed .
The resolution will be deleted. Next status will be 'reopened'.
to The owner will be changed from mjethani.
Note: See TracTickets for help on using tickets.