From b42ad7a32fb0af9768023327b07b87a2dfd6dc59 Mon Sep 17 00:00:00 2001 From: grnd-alt Date: Thu, 24 Jul 2025 15:45:15 +0200 Subject: [PATCH] fix: make comments with mention editable Signed-off-by: grnd-alt --- src/components/card/CommentForm.vue | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/components/card/CommentForm.vue b/src/components/card/CommentForm.vue index 788dc4ece..6a0f47b39 100644 --- a/src/components/card/CommentForm.vue +++ b/src/components/card/CommentForm.vue @@ -121,7 +121,12 @@ export default { // do it or not based on the next element instead of always // adding it. // FIXME user names can contain spaces, in that case they need to be wrapped @"user name" [a-zA-Z0-9\ _\.@\-']+ - const mentionValue = mention.firstElementChild.attributes['data-mention-id'].value + let mentionValue + if (mention.attributes['data-at-embedded'].value === 'true') { + mentionValue = mention.parentNode.parentNode.querySelector('.user-bubble__wrapper').attributes['data-mention-id'].value + } else { + mentionValue = mention.firstChild.attributes['data-mention-id'].value + } if (mentionValue.indexOf(' ') !== -1) { mention.replaceWith(' @"' + mentionValue + '" ') } else {