signavio / react-mentions

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

Highlighter position is not correct in scroll container #617

Open dodoto opened 2 years ago

dodoto commented 2 years ago

Steps to reproduce:

  1. input content and container scrollable
  2. @ to add user

Expected behaviour:

Observed behaviour: highlight Workaround:

prabath0061 commented 2 years ago

try 4.4.6, it worked well.

maciejregula commented 2 years ago

4.4.6 works fine, but 4.4.7 again spoils it.

wangsy503 commented 1 year ago

I also encountered the problem and I found that it was because :

  1. the position of .__highlight element is not the same as the position of .__input element
  2. the font used in .__highlight and .__input elements are different. For example the font is bold in highlight part but is normal in .__input.

Hope this can help you.

Ronaldo-C commented 8 months ago

I also encountered the problem and I found that it was because :

  1. the position of .__highlight element is not the same as the position of .__input element
  2. the font used in .__highlight and .__input elements are different. For example the font is bold in highlight part but is normal in .__input.

Hope this can help you.

This works for me.thanks