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

Issue with Mention Functionality Removing Text in React-Draft-Wysiwyg #1429

Open
Abdulrehmanharisdev opened this issue Mar 25, 2024 · 0 comments

Comments

@Abdulrehmanharisdev
Copy link

I have encountered an issue with the mention functionality in React-Draft-Wysiwyg when inserting mentions into the middle of the text and selecting them via the dropdown menu. Upon selecting a mention from the dropdown menu by clicking, it inadvertently removes some text to the right of the mention. This behavior is not observed when selecting mentions by hitting the enter key.

Steps to Reproduce:

  1. Insert text into the editor.
  2. Type "@" to trigger the mention functionality.
  3. Begin typing to filter the mention suggestions.
  4. When the desired mention appears in the dropdown menu, click on it to select it.

Expected Behavior:
The selected mention should be inserted into the editor without removing any adjacent text.

Actual Behavior:
Selecting a mention from the dropdown menu by clicking removes some text to the right of the mention.

This issue occurs specifically when inserting mentions into the middle of the text and selecting them via the dropdown menu. Mention insertion and selection via hitting the enter key work as expected.

Environment:
React-Draft-Wysiwyg version: [1.15.0]
Browser: [Chrome 122.0.6261.129]
Operating System: [ Windows 10]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant