Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Print is not working in ipad #56 #61

Merged
merged 1 commit into from
Jan 4, 2017
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion jQuery.print.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,9 @@
if (!frameWindow.document.execCommand('print', false, null)) {
// document.execCommand returns false if it failed -http://stackoverflow.com/a/21336448/937891
frameWindow.print();
}else{
// focus body as it is losing focus in iPad and content not getting printed
$('body').focus();
}
} catch (e) {
frameWindow.print();
Expand Down Expand Up @@ -83,7 +86,7 @@
// Destroy the iframe if created here
$iframe.remove();
}
}, 100);
}, 1000);
})
.fail(function (err) {
// Use the pop-up method if iframe fails for some reason
Expand Down