Bug 23904 - Chrome update does not allow use of window.open() during unload
Summary: Chrome update does not allow use of window.open() during unload
Status: CLOSED INVALID
Alias: None
Product: Koha
Classification: Unclassified
Component: Staff interface (show other bugs)
Version: Main
Hardware: All All
: P1 - high major
Assignee: Bugs List
QA Contact: Testopia
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-10-25 19:42 UTC by Lucas Gass (lukeg)
Modified: 2020-11-30 21:44 UTC (History)
2 users (show)

See Also:
Change sponsored?: ---
Patch complexity: ---
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:
Circulation function:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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.