Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

Improve after print handling #780

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

sensasi-delight
Copy link
Contributor

@sensasi-delight sensasi-delight commented Jan 7, 2025

This pull request resolves #779, which was caused by changes in #764, by separating the logic for mobile and desktop browsers. Additionally, I’ve improved the solution from PR #764 by using setTimeout instead of addEventListener to ensure proper execution after printing on mobile browsers.

I’ve also refactored repetitive code to make it cleaner and more maintainable.

Tested Successfully On:

 - Windows 11:
   - Chrome v131
   - Edge v131
   - Vivaldi v6
   - Vivaldi v7
- Android:
  - Chrome v131

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

In 3.0.3 and later onAfterPrint is called only after clicking back on the page
1 participant