Signed-off-by: marco.tngl.sh dev@marco.social
+2
-5
appview/pages/templates/repo/issues/fragments/replyComment.html
+2
-5
appview/pages/templates/repo/issues/fragments/replyComment.html
···
3
3
class="p-2 group w-full border-t border-gray-200 dark:border-gray-700 flex flex-col gap-2"
4
4
id="reply-form-{{ .Comment.Id }}"
5
5
hx-post="/{{ .RepoInfo.FullName }}/issues/{{ .Issue.IssueId }}/comment"
6
+
hx-trigger="submit, keydown[(ctrlKey || metaKey) && key=='Enter'] from:#reply-{{.Comment.Id}}-textarea"
6
7
hx-on::after-request="if(event.detail.successful) this.reset()"
7
8
hx-disabled-elt="#reply-{{ .Comment.Id }}"
8
9
>
···
13
14
class="w-full p-2"
14
15
placeholder="Leave a reply..."
15
16
autofocus
16
-
rows="3"
17
-
hx-trigger="keydown[ctrlKey&&key=='Enter']"
18
-
hx-target="#reply-form-{{ .Comment.Id }}"
19
-
hx-get="#"
20
-
hx-on:htmx:before-request="event.preventDefault(); document.getElementById('reply-form-{{ .Comment.Id }}').requestSubmit()"></textarea>
17
+
rows="3"></textarea>
21
18
22
19
<input
23
20
type="text"
History
2 rounds
1 comment
marco.tngl.sh
submitted
#1
1 commit
expand
collapse
appview/replyComment: 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/replyComment: add submit shortcut
Signed-off-by: marco.tngl.sh <dev@marco.social>
lgtm!