Skip to content

Commit

Permalink
fix: app window is all white after printing
Browse files Browse the repository at this point in the history
  • Loading branch information
larsmoa authored Jun 13, 2024
2 parents 4fec73c + b83e975 commit 53dacaf
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion packages/kernel/src/kernel.ts
Original file line number Diff line number Diff line change
Expand Up @@ -448,7 +448,10 @@ const initTokenStorageAndAuthHandler = (worker: StliteWorker) => {
data: appScreenshot,
});
} else if (event.data.type === "streamlit-app-print") {
window.print();
// Workaround for https://issues.chromium.org/issues/40094746
setTimeout(() => {
window.print();
}, 0);
} else if (event.data.type.startsWith("language-server:")) {
// StreamLit app main thread, forward the message to the worker
// so that the kernel can process the request
Expand Down

0 comments on commit 53dacaf

Please sign in to comment.