Feature: Portal contents can be printed using window.print()

Scenario: React.Portal is a new browser window

Given Portal contents contains a print button.
When window print is called in a component within the portal.
Then it prints the opener window. 🤦‍♂️

Follow

Swap window.print with () => externalWindow.print() when external window gets focus.

Then revert when the main window gets focus.

· · Web · 0 · 0 · 0
Sign in to participate in the conversation
Mastodon for Tech Folks

This Mastodon instance is for people interested in technology. Discussions aren't limited to technology, because tech folks shouldn't be limited to technology either!