aboutsummaryrefslogtreecommitdiffstats
path: root/web_src/js/index.js
diff options
context:
space:
mode:
authora1012112796 <1012112796@qq.com>2021-06-01 10:22:49 +0800
committerGitHub <noreply@github.com>2021-05-31 22:22:49 -0400
commit072df3ff87c399bccfddfc0901e63ebacfaec73d (patch)
treec9de026b8fa55fb3322a45d4fc9a20abac15959b /web_src/js/index.js
parent5de01e21a19732785931f2db9c553ddffa60c4e6 (diff)
downloadgitea-072df3ff87c399bccfddfc0901e63ebacfaec73d.tar.gz
gitea-072df3ff87c399bccfddfc0901e63ebacfaec73d.zip
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 <techknowlogick@gitea.io>
Diffstat (limited to 'web_src/js/index.js')
-rw-r--r--web_src/js/index.js2
1 files changed, 2 insertions, 0 deletions
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) {