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

Tracking issue: Myriad of bugs when pills include avatar initial (user avatar not set) #4772

Closed
lukebarnard1 opened this issue Aug 9, 2017 · 3 comments
Labels

Comments

@lukebarnard1
Copy link
Contributor

Because the initial that is used in the avatars place contributes to the length of the string within the decorated pill

@lukebarnard1
Copy link
Contributor Author

Caused by facebookarchive/draft-js#1327

@lukebarnard1
Copy link
Contributor Author

lukebarnard1 commented Aug 24, 2017

I've just thought of a workaround: using ::before and content seems to fool draft-js into thinking there isn't any text in the avatar node. This would work if there was a way to insert "anonymous replaced elements" into the DOM but I think this contradictory with how these elements work.

As per #4864 (comment), a solution that would work is using SVG to insert the letter.

@lukebarnard1 lukebarnard1 changed the title Removing the colon after a mention of a user _without_ an avatar destroys the mention Tracking issue: Myriad of bugs when pills include avatar initial (user avatar not set) Aug 31, 2017
@ara4n
Copy link
Member

ara4n commented Jul 16, 2018

fixed in matrix-org/matrix-react-sdk#1890

@ara4n ara4n closed this as completed Jul 16, 2018
@jryans jryans added the A-Pills label Jun 23, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants