From 7cea6ef93d8b8eca6e6a3b397b89f696f39d1081 Mon Sep 17 00:00:00 2001 From: Vanessa Date: Sat, 17 Sep 2022 10:02:10 +0800 Subject: [PATCH] :zap: https://github.com/siyuan-note/siyuan/issues/5875 --- app/src/protyle/export/index.ts | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/app/src/protyle/export/index.ts b/app/src/protyle/export/index.ts index bf2f682be..90f1618ae 100644 --- a/app/src/protyle/export/index.ts +++ b/app/src/protyle/export/index.ts @@ -239,10 +239,9 @@ const renderPDF = (id: string) => { right: 232px; left: 0; } - - ::-webkit-scrollbar { - width: 0px; - height: 0px; + body.exporting::-webkit-scrollbar { + width: 0; + height: 0; } pre code { max-height: none !important; @@ -366,7 +365,7 @@ const renderPDF = (id: string) => { return; } } else if (target.classList.contains("protyle-action__copy")) { - navigator.clipboard.writeText(item.parentElement.nextElementSibling.textContent.trimEnd()); + navigator.clipboard.writeText(target.parentElement.nextElementSibling.textContent.trimEnd()); event.preventDefault(); event.stopPropagation(); break; @@ -391,9 +390,10 @@ const renderPDF = (id: string) => { }, removeAssets: actionElement.querySelector("#removeAssets").checked, rootId: "${id}", - rootTitle: "{tpl.data.name}" + rootTitle: "{tpl.name}" }) actionElement.remove(); + document.querySelector("body").classList.add("exporting"); }); `; fetchPost("/api/export/exportPreviewHTML", {