From 072df3ff87c399bccfddfc0901e63ebacfaec73d Mon Sep 17 00:00:00 2001 From: a1012112796 <1012112796@qq.com> Date: Tue, 1 Jun 2021 10:22:49 +0800 Subject: [PATCH] update ``.raw-content`` when edit issue/comment content (#16021) * update ``.raw-content`` when edit issue/comment content fix #16000 Signed-off-by: a1012112796 <1012112796@qq.com> * handle empty content Co-authored-by: techknowlogick --- web_src/js/index.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/web_src/js/index.js b/web_src/js/index.js index 9f016ca84a..8818511e32 100644 --- a/web_src/js/index.js +++ b/web_src/js/index.js @@ -1098,8 +1098,10 @@ async function initRepository() { }, (data) => { if (data.length === 0 || data.content.length === 0) { $renderContent.html($('#no-content').html()); + $rawContent.text(''); } else { $renderContent.html(data.content); + $rawContent.text($textarea.val()); } const $content = $segment; if (!$content.find('.dropzone-attachments').length) {