Merge pull request #7197 from nextcloud/backport/7128/stable30

[stable30] fix: make comments with mention editable
This commit is contained in:
Luka Trovic
2025-09-01 12:00:00 +02:00
committed by GitHub

View File

@@ -121,7 +121,12 @@ export default {
// do it or not based on the next element instead of always // do it or not based on the next element instead of always
// adding it. // adding it.
// FIXME user names can contain spaces, in that case they need to be wrapped @"user name" [a-zA-Z0-9\ _\.@\-']+ // 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) { if (mentionValue.indexOf(' ') !== -1) {
mention.replaceWith(' @"' + mentionValue + '" ') mention.replaceWith(' @"' + mentionValue + '" ')
} else { } else {