react-mentions icon indicating copy to clipboard operation
react-mentions copied to clipboard

drag-and-drop issue

Open VldMrgnn opened this issue 4 years ago • 3 comments

Steps to reproduce: On existing text in textarea

  1. drag some selected text from other div
  2. move caret into ReactMention
  3. position the caret somewhere in-between the existing text
  4. drop selection

Expected behaviour: Expected to append the selected text dragged into the caret position Observed behaviour: -duplicates the text from the the caret position, appending it to the end.

Workaround: -tryed to control the onDrop event but still was unable to position the text corectly, instead is apended to the end... Annotation1 2020-07-12 184301 Annotation2 2020-07-12 184301

VldMrgnn avatar Jul 12 '20 15:07 VldMrgnn

A better example: Annotation1 2020-07-12 223056 Annotation2 2020-07-12 223056

VldMrgnn avatar Jul 12 '20 19:07 VldMrgnn

@VldMrgnn -- did you happen to find a solution for this? I've investigated the onDrop event and tried to see if the inputRef would have data on the cursor position of the drop (so I could manually handle the update), but I've had no luck.

Unfortunately it's becoming more of an issue lately. A fix here would ease a ton of headache.

tylertyssedal avatar Jun 21 '21 18:06 tylertyssedal

@tylertyssedal - sorry, I didn't found a way to fix this and later I switched to draft.js. If you find some solution please drop a link. Good luck to you!

VldMrgnn avatar Jun 21 '21 19:06 VldMrgnn