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

Bug: Enter Key Not Functioning Properly with "@" Symbol in the Response Editor #10698

Closed
iamsmruti opened this issue Jan 16, 2025 · 2 comments · Fixed by #10699
Closed

Bug: Enter Key Not Functioning Properly with "@" Symbol in the Response Editor #10698

iamsmruti opened this issue Jan 16, 2025 · 2 comments · Fixed by #10699
Labels

Comments

@iamsmruti
Copy link
Contributor

Issue - Bug

  • How serious is the bug? P2
  • OS: All ( e.g. MacOS / Linux / Windows )
  • Browser: All (e.g. Chrome / Safari / Lynx )
  • Node version: 20.18.1
  • NPM version: 10.8.2

Description

When typing text starting with the @ symbol, the Enter key functionality does not work as expected in certain scenarios:

  • Actual Mention (e.g., @actualMention): The popup appears as expected and when selecting from the popup, the behavior is correct.
  • Plain Text (e.g., @monaco-editor/react): This causes an issue where the Enter key does not move to the next line. Even when text is added after the @, it does not allow the user to hit Enter to create a new line.
Image

Also, this same bug is in the active tasks editor as well because the same component is being used there.

The issue occurs when the @ symbol and the text that follows it have the same style. The problem is most noticeable when the following occurs:

  • @packages → Both the @ and packages text have the same styles (non-bold).
  • @packages → Both the @ and packages text are bold.
  • @packages → The @ is non-bold while the text packages is bold, which does not trigger the issue.

The issue also arises when both the @ symbol and the text are italicized { basically if both text and symbol of same style }. In this case, the Enter key doesn’t move to the next line either.

Acceptance Criteria

  • Users should be able to type @ and see a popup with matching users.
  • When a user selects a mention from the popup, it should be inserted correctly.
  • If no matches for the user are found, pressing Enter after typing @ and some text should create a new line (not stuck in the current line).

Steps to Reproduce

  • Start typing @ in a text editor.
  • Add some text, e.g., @monaco-editor/react or @packages.
  • Observe that when both the @ symbol and the following text have the same style (both non-bold or both bold), pressing Enter does not move to the next line.

Expected Behavior

  • When no user matches are found after typing @ and text, pressing Enter should move the cursor to the next line.

  • If a user match is found, hitting Enter should select the user and insert it into the text.

    Triage is performed to find the root cause of the bug, timeboxed to ~1 hour.

Estimated effort: 1 hour to triage. More if the root cause is already identified.

@iamsmruti
Copy link
Contributor Author

I have created a PR for this issue. This is the PR #10699

@jordanh
Copy link
Contributor

jordanh commented Jan 17, 2025

Thank you for both the report and the PR!

@github-project-automation github-project-automation bot moved this to To triage in Product Jan 17, 2025
@github-project-automation github-project-automation bot moved this from To triage to Done in Product Jan 23, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Status: Done
Status: Done
Development

Successfully merging a pull request may close this issue.

2 participants