Render resets component's scroll to the top


(Mathieu Decaffmeyer) #1

I have a table containing a list of items, which shows a vertical scroll if the list is higher than the viewport.
When a user clicks on an item, the item should be highlighted, so I must render the list again. The problem is that the scroll’s position is reset to top when rendering.

Here is a demo: JSFiddle
The table should show a vertical scroll. Select a user on the bottom for example. The scroll will reset and if you scroll down, you’ll see that the selected user is highlighted. Of course, this is not the expected behaviour for the user ; the scroll position should not change.

Any advices are welcome!


(Mathieu Decaffmeyer) #2

Since then I’ve found out that it was some DOM manipulation in the code that was causing the scroll’s position reset


(Kobe Pernet) #3

Hi there,
I’m running into a similar issue where my form resets its scroll-position to the top of the page upon rendering. Have you made any progress in finding the culprit and/or a workaround for the issue?