When you add a mention or emoji by typing
:, followed by whatever is required, and hitting Enter, it completes the rest of the username / emoji name, followed by a space. I assume this space is so that you can keep typing, but it doesn’t shift the cursor to account for the newly added space. So as it is, you have to hit the spacebar anyway, and you have trailing whitespace.
Considering that you may also want to finish a sentence (or be done writing the post) after the mention or emoji, I’d be inclined to just get rid of the trailing space and let people hit spacebar if they need a space. The second option is shifting the cursor forward one character so it’s after the space (was this already the intended behavior?), but I’m not sure I see much value in that. I’d rather hit the spacebar when I need a space than delete an automatically added space when I don’t need one.