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

Mentions (@) plugin: suggestions disappears after clicking space bar #5659

Closed
volleybox opened this issue Oct 25, 2019 · 2 comments
Closed
Labels
package:mention resolution:duplicate This issue is a duplicate of another issue and was merged into it. type:bug This issue reports a buggy (incorrect) behavior.

Comments

@volleybox
Copy link

I have such bug while using Mentions plugin for Ckeditor 5:
Some of my autocomplete suggestions have whitespaces between words as you see on screen below.

Zrzut ekranu 2019-10-25 o 10 30 50

After clicking a space bar suggestions disappears and first suggestion is choosed. The same story is for slash (/) character.
Maybe you will tell that whitespaces shouldn't be used in hashtags. Ok, but what about users mentions? I just checked that on Slack that works fine.

My implementation is very similar to this example: https://ckeditor.com/docs/ckeditor5/latest/features/mentions.html Of course if there will be such need I can place it here.

Do you have some solutions / workarounds of that bug? In the worst scenario I will just remove whitespaces between words :(

@volleybox volleybox added the type:bug This issue reports a buggy (incorrect) behavior. label Oct 25, 2019
@Mgsy
Copy link
Member

Mgsy commented Oct 25, 2019

@jodator, can you take a look at this one?

@jodator jodator added package:mention resolution:duplicate This issue is a duplicate of another issue and was merged into it. labels Oct 25, 2019
@jodator
Copy link
Contributor

jodator commented Oct 25, 2019

Yes, this is intended behavior. I agree that this might be misleading for space as we only trigger mention UI for a marker + text (without spaces inside), so we use a space as a trigger to insert a mention. Other keys used for this are enter and tab. We probably could add a configuration for allowing/excluding certain keys on Mention UI.

Unfortunately, I don't have anything to overcome that but you can have your feed callback that would look into your feed data excluding space. In other words: for now users could type "adrianpat" and your feed callback should match "Adrian Patucha" for this.

As we already have a ticket for this: #4665 I'm closing this as a duplicate. You can add 👍 reaction to that ticket (issue description) as we look into tickets with many reactions to choose on what to fix in the first place.

As for / - the same will happen if you don't match any item in the feed so if there is no item in the feed the mention UI is closed.

@jodator jodator closed this as completed Oct 25, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
package:mention resolution:duplicate This issue is a duplicate of another issue and was merged into it. type:bug This issue reports a buggy (incorrect) behavior.
Projects
None yet
Development

No branches or pull requests

3 participants