From 9bf70debfb8a38da89a7bf5f7bd7634d504aa457 Mon Sep 17 00:00:00 2001 From: Lete Date: Mon, 25 Apr 2022 18:27:28 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=B8=BA=20Discuss=20=E6=B7=BB=E5=8A=A0?= =?UTF-8?q?=E6=9C=80=E4=BD=8E=E9=AB=98=E5=BA=A6=20(#742)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 为了避免使用评论表情时,被评论区当掉一半的bug --- layout/_plugins/comments/discuss/script.ejs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/layout/_plugins/comments/discuss/script.ejs b/layout/_plugins/comments/discuss/script.ejs index 47b665bf5..943cbc82e 100644 --- a/layout/_plugins/comments/discuss/script.ejs +++ b/layout/_plugins/comments/discuss/script.ejs @@ -12,6 +12,11 @@ let defaultPath = '<%= theme.comments.discuss.path %>'; path = defaultPath || decodeURI(window.location.pathname); } + + const style = document.createElement('style') + style.textContent = '#Discuss .D-comments-wrap{min-height:200px}' + document.head.appendChild(style) + Discuss.init(Object.assign(Object.assign(<%- JSON.stringify(theme.comments.discuss) %>, { el: '#discuss_container', path: path,