You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Whenever inputing a mention between text (for instance if someone were to replace a mention after they typed the continuation of their message), the beginning of the text gets repeated and there is also the original text there.
… text
The issue was that event.target is not the prompt form but actually a list item element,
which doesn't have the selectionStart attribute.
I've also added a change where inserting the mention in front of a space does not result in a double space.
chaowss
added a commit
to chaowss/primereact
that referenced
this issue
Aug 10, 2024
… text
The issue was that event.target is not the prompt form but actually a list item element,
which doesn't have the selectionStart attribute.
I've also added a change where inserting the mention in front of a space does not result in a double space.
chaowss
changed the title
Inserting a mention between text leads the first
Inserting a mention in between text results in text to be duplicated
Aug 10, 2024
melloware
added
Type: Bug
Issue contains a defect related to a specific component.
and removed
Status: Needs Triage
Issue will be reviewed by Core Team and a relevant label will be added as soon as possible
labels
Aug 10, 2024
* fixes issue #7014: inserting mentions results in duplicated text
The issue was that event.target is not the prompt form but actually a list item element,
which doesn't have the selectionStart attribute.
I've also added a change where inserting the mention in front of a space does not result in a double space.
* check to add space only if space is at beginning of nextText
Describe the bug
Whenever inputing a mention between text (for instance if someone were to replace a mention after they typed the continuation of their message), the beginning of the text gets repeated and there is also the original text there.
Screen.Recording.2024-08-09.at.4.44.53.PM.mov
Reproducer
No response
System Information
This is the demo on https://primereact.org/mention/
Steps to reproduce the behavior
input a mention between two strings, observe that the mention is appended to the old string with all of the characters preceding it repeated.
Expected behavior
It should just input the mention correctly without repeating text.
The text was updated successfully, but these errors were encountered: