diff --git a/src/components/card/CommentForm.vue b/src/components/card/CommentForm.vue index 5b6837b9e4..361c5c73fa 100644 --- a/src/components/card/CommentForm.vue +++ b/src/components/card/CommentForm.vue @@ -77,6 +77,9 @@ export default { members() { return this.currentBoard.users }, + hasContent() { + return this.commentText.trim().length > 0 + }, }, watch: { value(val) { @@ -196,4 +199,20 @@ export default { .atwho-li--avatar { margin-right: 10px; } + + .comment-form { + position: relative; + + .comment-form__submit { + position: absolute; + bottom: var(--default-grid-baseline); + inset-inline-end: var(--default-grid-baseline); + z-index: 1; + } + + // Add padding to prevent text from going under the button + :deep(.rich-content-editor__input) { + padding-inline-end: calc(var(--default-clickable-area) + var(--default-grid-baseline)); + } + } diff --git a/src/components/card/CommentItem.vue b/src/components/card/CommentItem.vue index 86c990c319..eaca58edbb 100644 --- a/src/components/card/CommentItem.vue +++ b/src/components/card/CommentItem.vue @@ -183,9 +183,7 @@ export default { }, showUpdateForm() { this.edit = true - this.$nextTick(() => { - this.commentMsg = this.$refs.richTextElement.children[0].innerHTML - }) + this.commentMsg = this.comment.message }, hideUpdateForm() { this.commentMsg = ''