summaryrefslogtreecommitdiffstats
path: root/templates/repo
diff options
context:
space:
mode:
authorHarshit Bansal <harshitbansal2015@gmail.com>2018-12-31 17:31:20 +0530
committerJonas Franz <info@jonasfranz.software>2018-12-31 13:01:20 +0100
commit2c7661a5241f201aef6e63e767e547cc0a5cd877 (patch)
tree375808fe9a8317baaba236d237b92e8284fa4867 /templates/repo
parent945804f800ac4e81c46bde848616e9d9392a9571 (diff)
downloadgitea-2c7661a5241f201aef6e63e767e547cc0a5cd877.tar.gz
gitea-2c7661a5241f201aef6e63e767e547cc0a5cd877.zip
Fix wrong text getting saved on editing second comment on an issue. (#5608)
* comments: Fix an incorrent DOM element selection. This commit fixes a bug that was causing text from previously edited comment to get saved when two comments were edited one after other. Text area with id of `#content` isn't unique on the page but it was being treated as unique by the event handling code. Fixes: #5581. * templates: Remove `id` from textarea in commit edit form. An element is assigned an `id` only if it is unique for the whole page but in this case there can be multiple textarea so it should have one.
Diffstat (limited to 'templates/repo')
-rw-r--r--templates/repo/diff/box.tmpl2
-rw-r--r--templates/repo/issue/view_content.tmpl2
2 files changed, 2 insertions, 2 deletions
diff --git a/templates/repo/diff/box.tmpl b/templates/repo/diff/box.tmpl
index 729e37c8b9..35f6ae36be 100644
--- a/templates/repo/diff/box.tmpl
+++ b/templates/repo/diff/box.tmpl
@@ -204,7 +204,7 @@
<a class="preview item" data-url="{{AppSubUrl}}/api/v1/markdown" data-context="{{$.RepoLink}}">{{$.i18n.Tr "preview"}}</a>
</div>
<div class="ui bottom attached active write tab segment">
- <textarea tabindex="1" id="content" name="content"></textarea>
+ <textarea tabindex="1" name="content"></textarea>
</div>
<div class="ui bottom attached tab preview segment markdown">
{{$.i18n.Tr "loading"}}
diff --git a/templates/repo/issue/view_content.tmpl b/templates/repo/issue/view_content.tmpl
index 54531cf4d8..ce2699af35 100644
--- a/templates/repo/issue/view_content.tmpl
+++ b/templates/repo/issue/view_content.tmpl
@@ -115,7 +115,7 @@
<a class="preview item" data-url="{{AppSubUrl}}/api/v1/markdown" data-context="{{$.RepoLink}}">{{$.i18n.Tr "preview"}}</a>
</div>
<div class="ui bottom attached active write tab segment">
- <textarea tabindex="1" id="content" name="content"></textarea>
+ <textarea tabindex="1" name="content"></textarea>
</div>
<div class="ui bottom attached tab preview segment markdown">
{{$.i18n.Tr "loading"}}