Opened on 05/11/2016 at 07:43:04 AM

Last modified on 07/18/2016 at 02:07:37 PM

#4034 new defect

Popup ads are closed too late

Reported by: mario Assignee:
Priority: P3 Milestone:
Module: Adblock-Browser-for-iOS Keywords: blocked
Cc: jand Blocked By:
Blocking: Platform: Adblock Browser for iOS
Ready: no Confidential: no
Tester: Unknown Verified working: no
Review URL(s):

Description

Environment

ABB 1.3.2
iOS 9.3.1
iPhone 6

How to reproduce

  1. Open ABB and browse to thepiratebay.se
  2. Scroll to the bottom of the page and tap "Return to web version"
  3. In the main menu tap "Browse torrents"
  4. Tap the category "Audio"

Observed behaviour

A popup ad is triggered which is opened in a new tab and closed afterwards. ABB waits until the animation for opening a new tab is finished before closing the popup which distracts the user and interrupts their browsing experience for 1-2 seconds.

Expected behaviour

A popup ad is triggered which is immediately closed before triggering the animation for opening a new tab.

Attachments (0)

Change History (4)

comment:1 Changed on 05/11/2016 at 08:29:09 AM by mario

  • Summary changed from Suppress ad popups before they're animated open to Suppress popup ads before they're animated in

comment:2 Changed on 05/12/2016 at 07:15:28 AM by mario

  • Summary changed from Suppress popup ads before they're animated in to Popup ads are closed too late

comment:3 Changed on 05/25/2016 at 07:45:59 AM by pavelz

comment:4 Changed on 07/18/2016 at 02:07:37 PM by pavelz

  • Cc jand added
  • Keywords blocked added
  • Ready unset

We've got a conceptual issue with this. ABP popup checking logic is hooked on webNavigation.onCreatedNavigationTarget which in itself does not provide any resolution callback. The popup removal is performed through tabs.remove call in checkPotentialPopup. So we absolutely can apply a following order of handling:

  1. create the new tab data structure and assign it tabId, so that it's ready for onCreatedNavigationTarget inspection
  2. contrary to current state, do NOT launch UI animation to present the tab
  3. fire onCreatedNavigationTarget
  4. wait for tabs.remove and either delete the structure or go on with UI presentation

Unfortunately, the extension gives no trigger, no event for a positive feedback.
In other words, we don't know that the removal is not going to happen.

The only deterministic solution we've came up with is to hook on popupBlocker module from api.js. That would require code changes in popupBlocker because Object.observe is deprecated.

Non deterministic solution would be a timeout. If chrome.tabs.remove does not arrive in, say 0.3secs, we'll go on with the animation. That also means that ANY popup tab creation would be deferred by 0.3secs.

Speculations about how Chrome is possibly doing it are welcome.
@mario please CC a suitable coder and/or decision maker.
Meanwhile marking the issue as blocked and unreadying it.

Add Comment

Modify Ticket

Change Properties
Action
as new .
as The resolution will be set. Next status will be 'closed'.
to The owner will be changed from (none).
Next status will be 'reviewing'.
 
Note: See TracTickets for help on using tickets.