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

Merged
merged 1 commit into from
Jan 27, 2025

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

Copy link
Owner

@MatthewHerbst MatthewHerbst left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've filed an upstream bug report to Vivaldi (VB-112980). If we don't hear from them in the next few days I'll merge this.

@MatthewHerbst MatthewHerbst merged commit 2dbeb29 into MatthewHerbst:master Jan 27, 2025
@sensasi-delight sensasi-delight deleted the patch779 branch January 28, 2025 11:43
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
2 participants