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

Minimal character count for autocomplete is incorrect if preceded with an unfinished autocomplete match #2394

Closed
mlewand opened this issue Sep 10, 2018 · 5 comments · Fixed by #2452
Assignees
Labels
plugin:autocomplete The plugin which probably causes the issue. plugin:emoji The plugin which probably causes the issue. regression This issue is a regression. status:confirmed An issue confirmed by the development team. target:minor Any docs related issue that can be merged into a master or major branch. type:bug A bug.
Milestone

Comments

@mlewand
Copy link
Contributor

mlewand commented Sep 10, 2018

Type of report

Bug

Provide detailed reproduction steps (if any)

  1. Open any editor with Emoji plugin enabled.
  2. Focus the editor.
  3. Empty the contents (e.g. ctrl/cmd+a, del).
  4. Type :smiling_face.
  5. Press esc key to cancel completion, so it doesn't get replaced by a emoji.
  6. Press space.
  7. Type :smi.

Expected result

Dropdown with emoji appears.

Actual result

No dropdown appears.

Other details

Interestingly if you continue the typing till you have :smiling_face_ (so that it is longer than the first token) the autocomplete appears.

This issue is very, very awkward. At first I thought that matching doesn't work at all, but then it seemed to me that it works, but minimal charcount is considered based on preceding match.

I presume that the issues is in autocomplete plugin rather than emoji.

Looks like it's a regression in 4.10.1 as I can't reproduce it with 4.10.0. I guess that it got introduced with #2195.

  • Browser: Any
  • OS: Any
  • CKEditor version: 4.10.1
@mlewand mlewand added type:bug A bug. status:confirmed An issue confirmed by the development team. regression This issue is a regression. plugin:autocomplete The plugin which probably causes the issue. labels Sep 10, 2018
@mlewand mlewand added this to the 4.10.2 milestone Sep 10, 2018
@mlewand mlewand removed the status:confirmed An issue confirmed by the development team. label Sep 10, 2018
@engineering-this engineering-this added the status:confirmed An issue confirmed by the development team. label Sep 10, 2018
@engineering-this
Copy link
Contributor

I can reproduce it.

@mlewand mlewand added the target:minor Any docs related issue that can be merged into a master or major branch. label Sep 10, 2018
@engineering-this
Copy link
Contributor

engineering-this commented Sep 10, 2018

Might be related to #2352.

@jacekbogdanski
Copy link
Member

I closed the mentioned issue (#2352) as a duplicate thus it's the same one. However, I believe that this issue is more related to the emoji plugin than autocomplete itself thus mentions works as expected with the same use case.

@jacekbogdanski jacekbogdanski added the plugin:emoji The plugin which probably causes the issue. label Sep 25, 2018
@jacekbogdanski jacekbogdanski self-assigned this Oct 3, 2018
@jacekbogdanski
Copy link
Member

jacekbogdanski commented Oct 3, 2018

The issue has been introduced by b264124

@mlewand
Copy link
Contributor Author

mlewand commented Oct 4, 2018

Fixed with #2452.

@mlewand mlewand closed this as completed Oct 4, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
plugin:autocomplete The plugin which probably causes the issue. plugin:emoji The plugin which probably causes the issue. regression This issue is a regression. status:confirmed An issue confirmed by the development team. target:minor Any docs related issue that can be merged into a master or major branch. type:bug A bug.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants