diff options
Diffstat (limited to 'web_src/js')
-rw-r--r-- | web_src/js/features/comp/TextExpander.js | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/web_src/js/features/comp/TextExpander.js b/web_src/js/features/comp/TextExpander.js index e2840610df..128a2ddff0 100644 --- a/web_src/js/features/comp/TextExpander.js +++ b/web_src/js/features/comp/TextExpander.js @@ -53,7 +53,9 @@ export function initTextExpander(expander) { }); expander?.addEventListener('text-expander-value', ({detail}) => { if (detail?.item) { - detail.value = detail.item.getAttribute('data-value'); + // add a space after @mentions as it's likely the user wants one + const suffix = detail.key === '@' ? ' ' : ''; + detail.value = `${detail.item.getAttribute('data-value')}${suffix}`; } }); } |