From: shamoon <4887959+shamoon@users.noreply.github.com> Date: Fri, 17 Mar 2023 05:56:33 +0000 (-0700) Subject: Support control/command-enter submit comment form X-Git-Tag: v1.14.0-beta.rc1~33^2~4 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=9aa41b35242e8e7ecdfa3a01eaa66d01caee885d;p=thirdparty%2Fpaperless-ngx.git Support control/command-enter submit comment form --- diff --git a/src-ui/src/app/components/document-comments/document-comments.component.html b/src-ui/src/app/components/document-comments/document-comments.component.html index ffc8bfb9f7..b303524147 100644 --- a/src-ui/src/app/components/document-comments/document-comments.component.html +++ b/src-ui/src/app/components/document-comments/document-comments.component.html @@ -1,7 +1,7 @@
- +
Please enter a comment.
diff --git a/src-ui/src/app/components/document-comments/document-comments.component.ts b/src-ui/src/app/components/document-comments/document-comments.component.ts index 602d6bdb1d..316a2ff289 100644 --- a/src-ui/src/app/components/document-comments/document-comments.component.ts +++ b/src-ui/src/app/components/document-comments/document-comments.component.ts @@ -106,4 +106,10 @@ export class DocumentCommentsComponent extends ComponentWithPermissions { } return nameComponents.join(' ') } + + commentFormKeydown(event: KeyboardEvent) { + if ((event.metaKey || event.ctrlKey) && event.key === 'Enter') { + this.addComment() + } + } }