I am having 100 list which can be open one at a time, and each list contains dynamic length of data.
If I click on list 1 it expands and all the list go down and when I click on close list 1 it return to it's own state and rest of the list come up.
The problem occurs when I open list1 and then scroll down to list2 and try to open it.
In this case list - 1 will auto close and list2 open but page position varies if list1 is having high height and list2 is low height.
I was trying to scroll on to clicked item by using this code
window.scrollTo(e.screenX,e.screenY);
here is a link demo what i try to achieve Link
https://jsfiddle.net/69z2wepo/280996/
but it's not working well for last element as x and y contain view port distances. if anyone know how to solve this please help, any useful suggestion is appreciated.