Bug 23904

Summary: Chrome update does not allow use of window.open() during unload
Product: Koha Reporter: Lucas Gass (lukeg) <lucas>
Component: Staff interfaceAssignee: Bugs List <koha-bugs>
Status: CLOSED INVALID QA Contact: Testopia <testopia>
Severity: major    
Priority: P1 - high CC: gmcharlt, wizzyrea
Version: Main   
Hardware: All   
OS: All   
Change sponsored?: --- Patch complexity: ---
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
Circulation function:

Description Lucas Gass (lukeg) 2019-10-25 19:42:35 UTC
According to developers.google.com the following is true in Chrome:

Don't allow popups during page unload
Pages may no longer use window.open() to open a new page during unload. The Chrome popup blocker already prohibited this, but now it is prohibited whether or not the popup blocker is enabled.

Koha uses windows.open() to open print dialogues for Print Slip and Print Quick Slip. These no longer open as members-menu.js uses windows.open().
Comment 1 Owen Leonard 2019-10-28 14:12:59 UTC
I think the important detail relevant to us is that this new restriction is for window.open() *during unload.* I would take that to mean that we can't trigger a pop-up window with the unload event (https://developer.mozilla.org/en-US/docs/Web/API/Window/unload_event).

The only instance of "onunload" I see in the code is in SCO and it isn't used to open a window.
Comment 2 Lucas Gass (lukeg) 2019-10-28 14:39:20 UTC
Owen,

You are correct, I filed this bug to hastily. Marking it resolved now.