selection
selection copied to clipboard
Scrolling issues on webkit browsers
Hello,
I am struggling to get selection working inside a overflow: scroll container.
Relevant code: https://codesandbox.io/s/viselect-react-forked-50x7n?file=/src/App.tsx:899-1034 Live demo: https://50x7n.sse.codesandbox.io/
Here is what I get: https://user-images.githubusercontent.com/1047512/137693145-85b984f1-de76-48b4-b9d4-4f23b9e7598a.mov
What I would like to achieve is that position of the selection area would be fixed inside the scrolling container and auto scroll would also work.
I tried changing position of the selection area parent (this._area) from fixed, to static, absolute, and relative, but the result was always broken.
Is what I am trying to achieve even possible with this library?
I created a discussion first, but then I realized this might be a bug.
The SelectionArea itself must be scroll-able - not the container. example
Thank you. I'll give it a go one more time.
BTW There is a reproducible bug in Safari regarding the scrolling behaviour. I tested only Safari 15.0, don't have any older versions around.
https://user-images.githubusercontent.com/1047512/137856547-7b98d9bb-279e-4e68-a18c-a65688d2d85d.mov
https://user-images.githubusercontent.com/1047512/137856796-a1f5030a-ab43-405b-871d-0d970ad276cf.mov