react-flip-toolkit
react-flip-toolkit copied to clipboard
Prevent element being followed by scrolling in Chrome
I have a list of elements longer than the viewport. When the user interacts with an element below the fold and this one is reordered above the fold, the viewport is scrolled upwards to follow the element. How can I prevent this?
I tried the following in the event, but document.activeElement is only body :
if ("activeElement" in document) {
document.activeElement.blur()
}
Any ideas?
I'm experiencing the same thing in Firefox. Have you found a solution yet? I made a code sample reproducing the issue: https://codesandbox.io/s/react-flip-toolkit-unexpected-scrolling-eo621
https://user-images.githubusercontent.com/4968522/102698407-f99f3980-420a-11eb-84f6-9e42dcd1c954.mov
It woud be awesome to have at least a hack to avoid this