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

Newline prevented after a user mention #41724

Closed
chad1008 opened this issue Jun 14, 2022 · 1 comment
Closed

Newline prevented after a user mention #41724

chad1008 opened this issue Jun 14, 2022 · 1 comment
Assignees
Labels
[Package] Components /packages/components [Type] Bug An existing feature does not function as intended

Comments

@chad1008
Copy link
Contributor

Description

After mentioning another user on the site, the focus is captured by the autocompleter, preventing the Enter/Return key from creating a line break.

This was introduced in a recent PR updating the Autocomplete component.

Step-by-step reproduction instructions

  1. Make sure the stie you're testing on has at least one other registered user besides yourself.
  2. Open the block editor and begin typing into a paragraph block. In the first line of text, type @ to initiate a user mention
  3. Enter part of another user's username, and press Enter/Return to select for autocompletion
  4. Press space and enter some more text, then hit Enter/Return

The next after the user mention is removed, and a new line isn't created. The Autocomplete component is still engaged, and it trims the "extra" text to match/complete the username you selected.

Screenshots, screen recording, code snippet

No response

Environment info

No response

Please confirm that you have searched existing issues in the repo.

Yes

Please confirm that you have tested with all plugins deactivated except Gutenberg.

Yes

@chad1008
Copy link
Contributor Author

The PR introducing this issue has been reverted (##41820) and will land in the v13.5 release next week, so I'm closing this for now. I'll be taking another pass at that refactor in the future and will keep this regression in mind to avoid it going forward!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Package] Components /packages/components [Type] Bug An existing feature does not function as intended
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants