Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Preserve whitespace after @mention on web #7562

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

c960657
Copy link
Contributor

@c960657 c960657 commented Jan 23, 2025

On web, clicking New post from the Profile page should open the composer prefilled with “@account ”, but the trailing space is missing.

Fixes #7476.

Fix described on ueberdosis/tiptap#5158.

@jamesleesaunders
Copy link
Contributor

I have just tested and it appears to now work as expected.
The behaviour on mobile and web is the same.
Screenshot 2025-01-29 at 15 47 08

@jamesleesaunders
Copy link
Contributor

I have noticed one thing though (I don't know if this is possible to also 'fix'?)....

This PR does now add a space after the @mention which now matches mobile behaviour. But on mobile when you start a new post the @mention is blue (resolved to link) where as on web the @mention remains black. Only if you click on the name and select will it turn blue.

It would appear on mobile there is some event which, on text change, resolves any names, links etc in the text to blue.

When you do eventually post it does add the @mention link later but while editing it is not blue.

@jamesleesaunders
Copy link
Contributor

Example:
Screenshot 2025-01-29 at 17 32 50

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add a space after the username when making a post to that user
2 participants