There was an error while loading. Please reload this page.
1 parent 125fb5b commit b42ad7aCopy full SHA for b42ad7a
1 file changed
src/components/card/CommentForm.vue
@@ -121,7 +121,12 @@ export default {
121
// do it or not based on the next element instead of always
122
// adding it.
123
// FIXME user names can contain spaces, in that case they need to be wrapped @"user name" [a-zA-Z0-9\ _\.@\-']+
124
- const mentionValue = mention.firstElementChild.attributes['data-mention-id'].value
+ let mentionValue
125
+ if (mention.attributes['data-at-embedded'].value === 'true') {
126
+ mentionValue = mention.parentNode.parentNode.querySelector('.user-bubble__wrapper').attributes['data-mention-id'].value
127
+ } else {
128
+ mentionValue = mention.firstChild.attributes['data-mention-id'].value
129
+ }
130
if (mentionValue.indexOf(' ') !== -1) {
131
mention.replaceWith(' @"' + mentionValue + '" ')
132
} else {
0 commit comments