Hi I am using PrintJs javascript library. I assigned a call back function in OnPrintDialogClose option. It didn't fired immediately after the print preview window was closed but it only fired after I switched to new browser tab or I press Alt+Tab on Windows OS. Does anybody know why it didn't triggered after print preview window close.
This is my Codepen sample
This is my javascript code snippet.
<script>
var afterPreviewClose = function(){
window.location = "index.html";
};
$("#btnPrint").on("click",function(){
printJS({
printable: 'print-area',
type: 'html',
onPrintDialogClose: afterPreviewClose,
css: 'styles/styles.css' });
});
</script>