Monorepo for Tangled tangled.org

appview/replyComment: add submit shortcut #1108

merged opened by marco.tngl.sh targeting master from marco.tngl.sh/core: push-lxxussryqomn
Labels

None yet.

assignee

None yet.

Participants 2
AT URI
at://did:plc:uvlgxr6xf446eugiky6s3swz/sh.tangled.repo.pull/3mg3ovr45az22
+2 -5
Diff #1
+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
sign up or login to add to the discussion
1 commit
expand
appview/replyComment: add submit shortcut
expand 0 comments
pull request successfully merged
1 commit
expand
appview/replyComment: add submit shortcut
expand 1 comment