Buttons icon indicating copy to clipboard operation
Buttons copied to clipboard

window.open might return null

Open dtsamitros opened this issue 4 years ago • 1 comments

https://github.com/DataTables/Buttons/blob/445197cdb0bcbef2d1eff83844e6624d4a5151d6/js/buttons.print.js#L139-L140

I am using the latest version of Firefox and is by default blocking popups (https://developer.mozilla.org/en-US/docs/Web/API/Window/open#return_value) and a console error is thrown consequently (Uncaught TypeError: win is null). Perhaps a callback eg windowOpenFailed should be provided so the client can handle the error, or perhaps a warning should be displayed to the user.

dtsamitros avatar Mar 13 '21 18:03 dtsamitros

Thanks for flagging this issue up! Fix committed in master 1f0ebf5.

DataTables avatar Mar 18 '21 14:03 DataTables