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

No space after programmatically inserted mention #543

Open
tcitworld opened this issue Dec 11, 2019 · 2 comments
Open

No space after programmatically inserted mention #543

tcitworld opened this issue Dec 11, 2019 · 2 comments
Labels
bug

Comments

@tcitworld
Copy link

@tcitworld tcitworld commented Dec 11, 2019

Describe the bug
When adding a mention through the @ matcher, an extra space is added after the mention <span> so that the cursor is located after. When adding a mention programmatically, a <br> element follows the mention span and is replaced with content when some is entered.

Steps to Reproduce / Codesandbox Example
Steps to reproduce the behavior:

  1. Go to https://tiptap.scrumpy.io/suggestions
  2. Click on 'Insert Mention'
  3. Select and validate a name and continue to type extra characters
  4. The extra characters are not separated from the mention

Expected behavior
Same behaviour by triggering the @ matcher and adding a mention programmatically.

Environment

  • Browser Firefox
  • Version 71
  • Mobile / Desktop: Desktop
@tcitworld tcitworld added the bug label Dec 11, 2019
@therealwolf42
Copy link

@therealwolf42 therealwolf42 commented Mar 9, 2020

I'm trying to prevent the extra space being created. Do you know where in the code it's being added? Nvm. Found it in #351

@philippkuehn
Copy link
Contributor

@philippkuehn philippkuehn commented Mar 10, 2020

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

Successfully merging a pull request may close this issue.

None yet
3 participants
You can’t perform that action at this time.