signavio / react-mentions

@mention people in a textarea
https://react-mentions.vercel.app
Other
2.42k stars 566 forks source link

Cursor always jumps to the end of the text field when pasting text (React 18) #658

Closed nikgraf closed 1 year ago

nikgraf commented 1 year ago

Steps to reproduce:

  1. Upgrade the demo to react 18 and use the new createRoot functionality to use concurrent React
  2. Paste test into a textarea (in the beginning or somewhere in between existing text)

Expected behaviour:

The cursor should be at the end of the pasted text

Observed behaviour:

Cursor always jumps to the end of the text field

Demo video

https://user-images.githubusercontent.com/223045/221598641-4030fa32-8422-4a51-b6b2-eb4a193206b0.mov

Workaround:

None