aboutsummaryrefslogtreecommitdiffstats
path: root/templates/repo/issue/view_content.tmpl
diff options
context:
space:
mode:
authorTim <timwundenberg@outlook.de>2024-12-20 16:39:19 +0100
committerGitHub <noreply@github.com>2024-12-20 23:39:19 +0800
commit7580bd98c1c9c108500b0c295d5fb6aa057170d4 (patch)
tree48828986b0c7fbff4068c230dc57e9f5db89d837 /templates/repo/issue/view_content.tmpl
parent52b319bc00712da095ee4121b616be232b1e455b (diff)
downloadgitea-7580bd98c1c9c108500b0c295d5fb6aa057170d4.tar.gz
gitea-7580bd98c1c9c108500b0c295d5fb6aa057170d4.zip
show warning on navigation if currently editing comment or title (#32920)
This PR fixes the issue https://github.com/go-gitea/gitea/issues/32223 Make the browser to show the confirm popup, as it does with other forms. --------- Co-authored-by: Tim Wundenberg <tim@wundenbergs.de> Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
Diffstat (limited to 'templates/repo/issue/view_content.tmpl')
-rw-r--r--templates/repo/issue/view_content.tmpl8
1 files changed, 4 insertions, 4 deletions
diff --git a/templates/repo/issue/view_content.tmpl b/templates/repo/issue/view_content.tmpl
index 69b5a11a14..1a68781ecd 100644
--- a/templates/repo/issue/view_content.tmpl
+++ b/templates/repo/issue/view_content.tmpl
@@ -139,7 +139,7 @@
</div>
<template id="issue-comment-editor-template">
- <div class="ui form comment">
+ <form class="ui form comment">
<div class="field">
{{template "shared/combomarkdowneditor" (dict
"CustomInit" true
@@ -158,11 +158,11 @@
<div class="field">
<div class="text right edit">
- <button class="ui cancel button">{{ctx.Locale.Tr "repo.issues.cancel"}}</button>
- <button class="ui primary button">{{ctx.Locale.Tr "repo.issues.save"}}</button>
+ <button type="button" class="ui cancel button">{{ctx.Locale.Tr "repo.issues.cancel"}}</button>
+ <button type="submit" class="ui primary button">{{ctx.Locale.Tr "repo.issues.save"}}</button>
</div>
</div>
- </div>
+ </form>
</template>
{{template "repo/issue/view_content/reference_issue_dialog" .}}