signavio / react-mentions

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

Scroll jumps when I click inside text area (after inserted very long text) #340

Open delgermurun opened 5 years ago

delgermurun commented 5 years ago

Hello,

This bug happens when I edit very long text on react-mention input.

I scroll, then put my mouse cursor on some line, the moment I place a cursor, content scrolls down abruptly and my view ends up at the much lower position then I wanted.

I could reproduce it on https://react-mentions.wolf-pack.now.sh/. Copy/paste long text (for example this), then scroll down and click the mouse (try to place cursor).

Please try multiple times, it happens less than 100% of the time.

uRvfaXRNOR

Thank you.

delgermurun commented 5 years ago

I debugged it and I find out that this bug occurs only on Chrome. Works fine on Firefox and Safari.

Also, I found that bug occurs when you scroll until caret/cursor disappears through the top edge. Then when you click a mouse, scroll jumps and moves caret/cursor to old/previous position.