Signed-off-by: marco.tngl.sh dev@marco.social
+2
-1
appview/pages/templates/repo/issues/fragments/newComment.html
+2
-1
appview/pages/templates/repo/issues/fragments/newComment.html
···
4
4
id="comment-form"
5
5
hx-post="/{{ .RepoInfo.FullName }}/issues/{{ .Issue.IssueId }}/comment"
6
6
hx-trigger="submit, keydown[commentButtonEnabled() && (ctrlKey || metaKey) && key=='Enter'] from:#comment-textarea"
7
+
hx-indicator="#comment-button"
8
+
hx-disabled-elt="#comment-form button"
7
9
hx-on::after-request="if(event.detail.successful) this.reset()"
8
10
>
9
11
<div class="bg-white dark:bg-gray-800 rounded drop-shadow-sm py-4 px-4 relative w-full">
···
26
28
<button
27
29
id="comment-button"
28
30
type="submit"
29
-
hx-disabled-elt="#comment-button"
30
31
class="btn-create p-2 flex items-center gap-2 no-underline hover:no-underline group"
31
32
disabled
32
33
>
History
2 rounds
2 comments
marco.tngl.sh
submitted
#1
1 commit
expand
collapse
appview/newComment: add submit shortcut
Signed-off-by: marco.tngl.sh <dev@marco.social>
expand 0 comments
pull request successfully merged
marco.tngl.sh
submitted
#0
1 commit
expand
collapse
appview/newComment: add submit shortcut
Signed-off-by: marco.tngl.sh <dev@marco.social>
expand 2 comments
Sorry about that and thanks for checking! I've changed it so that all buttons in the form are disabled when the request is inflight. I figured it makes more sense this way, otherwise one would be able to double submit through the "close with comment" button.
there are a few minor regressions with this one: