mirror of
https://github.com/zadam/trilium.git
synced 2025-11-14 01:05:49 +01:00
chore(client/print): address requested changes
This commit is contained in:
@@ -322,7 +322,12 @@ export default class NoteDetailWidget extends NoteContextAwareWidget {
|
||||
iframe.className = "print-iframe";
|
||||
document.body.appendChild(iframe);
|
||||
iframe.onload = () => {
|
||||
if (!iframe.contentWindow) return;
|
||||
if (!iframe.contentWindow) {
|
||||
toast.closePersistent("printing");
|
||||
document.body.removeChild(iframe);
|
||||
return;
|
||||
}
|
||||
|
||||
iframe.contentWindow.addEventListener("note-ready", () => {
|
||||
toast.closePersistent("printing");
|
||||
iframe.contentWindow?.print();
|
||||
|
||||
Reference in New Issue
Block a user