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

MentionExtension keeps showing FloatingWrapper with suggestions after leaving a mention item when mention item text starts with @ #2087

Open
SunPj opened this issue Jun 6, 2023 · 0 comments
Labels
type: bug 🪲 Something isn't working

Comments

@SunPj
Copy link

SunPj commented Jun 6, 2023

Summary

MentionExtension keeps showing FloatingWrapper with suggestions after leaving a mention item when mention item text starts with @

Steps to reproduce

  1. Add extension to your editor
      new MentionExtension({
        extraAttributes: { type: "user" },
        matchers: [{ name: "at", char: "@", appendText: " ", matchOffset: 0 }],
      }),
  1. Hard code items like following
[
  {id: "a", label: "@A"}
]
  1. In your editor add @A tag and keep writing a text, suggestions list doesn't disappear
  2. If you remove @ from item's label then everything works as expected

Expected results

Suggestions list should disappear after adding mention and keeping typing a text

Possible Solution

I think char: "@" from the settings clashes with @ from the label

Screenshot(s)

Image

@SunPj SunPj added the type: bug 🪲 Something isn't working label Jun 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: bug 🪲 Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant