aboutsummaryrefslogtreecommitdiffstats
path: root/templates/repo
diff options
context:
space:
mode:
authorsilverwind <me@silverwind.io>2023-07-31 00:11:15 +0200
committerGitHub <noreply@github.com>2023-07-31 00:11:15 +0200
commitaa723dea9b4e22d93a1df8f38ee572e923756614 (patch)
treedcda0cf2ee0700d5e84503b4390652a63cbbf24a /templates/repo
parent4244ce0d28fcf4fbfd98632c33336421f197a51e (diff)
downloadgitea-aa723dea9b4e22d93a1df8f38ee572e923756614.tar.gz
gitea-aa723dea9b4e22d93a1df8f38ee572e923756614.zip
Don't autosize textarea in diff view (#26233)
Resizing the comment editor can be a very expensive operation because it triggers page reflows, which on large PRs can take upwards of seconds to complete. Disable this mechanism on the diff page only where we know that the page can get large. Fixes https://github.com/go-gitea/gitea/issues/26201 for the textarea editor. I don't think this can be fixed for EasyMDE because as far as I can tell, it exposes no option to disable this resizing. --------- Co-authored-by: Giteabot <teabot@gitea.io>
Diffstat (limited to 'templates/repo')
-rw-r--r--templates/repo/diff/comment_form.tmpl1
1 files changed, 1 insertions, 0 deletions
diff --git a/templates/repo/diff/comment_form.tmpl b/templates/repo/diff/comment_form.tmpl
index 109f167967..8565deb168 100644
--- a/templates/repo/diff/comment_form.tmpl
+++ b/templates/repo/diff/comment_form.tmpl
@@ -17,6 +17,7 @@
"TextareaName" "content"
"TextareaPlaceholder" ($.locale.Tr "repo.diff.comment.placeholder")
"DropzoneParentContainer" "form"
+ "DisableAutosize" "true"
)}}
<div class="field footer gt-mx-3">