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

Autocomplete adds spaces before mention-parameter #4127

Closed
SystemKeeper opened this issue May 16, 2023 · 1 comment · Fixed by #5359
Closed

Autocomplete adds spaces before mention-parameter #4127

SystemKeeper opened this issue May 16, 2023 · 1 comment · Fixed by #5359
Labels
bug Something isn't working feature: rich-contenteditable Related to the rich-contenteditable components

Comments

@SystemKeeper
Copy link

image

Video:

Bildschirmaufnahme.2023-05-16.um.21.29.13.mov

This is reproducible when sending messages in Talk and mentioning someone. You only had 1 space before the "@" when writing the message, but have 3 spaces after sending it.

@Antreesy
Copy link
Contributor

Antreesy commented Mar 7, 2024

// Mount and get raw html
Item.$mount(mount)
const renderedHtml = wrapper.innerHTML

As HTML replaces new lines, empty lines and consecutive whitespaces with a single whitespace, which parseContent() can't trim, we might look for a solution to make it manually. So far works:

const renderedHtml = wrapper.innerHTML.replace(/>\s+</g, '><')

See discussion at #5359 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working feature: rich-contenteditable Related to the rich-contenteditable components
Projects
None yet
2 participants