Opened 4 years ago

Closed 4 years ago

Last modified 3 years ago

#3477 closed defect (fixed)

window.close makes the tab ignore following JS activity

Reported by: pavelz Assignee:
Priority: P3 Milestone: Adblock-Browser-for-iOS-1.3.0
Module: Adblock-Browser-for-iOS Keywords: salsita
Cc: mario Blocked By:
Blocking: Platform: Adblock Browser for iOS
Ready: yes Confidential: no
Tester: Scheer Verified working: yes
Review URL(s):

Description (last modified by mario)

Environment

iPhone 6
iOS 9.2
ABB 1.2.1

How to reproduce

Open a website in Adblock Browser containing the following Java Script:

function magic () {
  window.close();
  window.open("http://adblockplus.org", "_blank");
}
window.setTimeout(magic, 1000);


Observed behaviour

window.open is not executed and thus "adblockplus.org" is not opened.

Expected behaviour

window.open is executed and thus "adblockplus.org" is opened.

Background

window.close does not mean that the current JS context immediately disappears, it continues execution. But in the example above window.open is ignored.
While, from a certain point of view the original behaviour makes sense, the behavior of all other browsers is imperative. The commands keep being executed normally until the current event loop finishes.

Change History (9)

comment:1 Changed 4 years ago by mario

  • Cc mario added
  • Description modified (diff)
  • Keywords salsita added
  • Priority changed from Unknown to P3
  • Ready set

comment:2 Changed 4 years ago by pavelz

  • Blocking 3483 added

comment:4 Changed 4 years ago by pavelz

  • Blocking 3483 removed

comment:5 Changed 4 years ago by jand

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

window.close logic is now encapsulated in setTimeout. This is not fixed on current release.

comment:6 Changed 3 years ago by mario

  • Milestone set to Adblock-Browser-for-iOS-next

comment:7 Changed 3 years ago by mario

  • Milestone Adblock-Browser-for-iOS-next deleted

comment:8 Changed 3 years ago by mario

  • Milestone set to Adblock-Browser-for-iOS-next

Rebased the current release branch to include this ticket.

comment:9 Changed 3 years ago by scheer

  • Tester changed from Unknown to Scheer
  • Verified working set
  • Window.open is executed and the web page is opened. I tested this with a varying web pages as well as a locally hosted page supplied by jand.

ABP 1.3.0-qa (844)
iPhone 6 Plus - iOS 9.2.1

Note: See TracTickets for help on using tickets.