Scroll position affected by refresh()

48 views
Skip to first unread message

Santeri Korri

unread,
Nov 18, 2014, 4:14:56 AM11/18/14
to jst...@googlegroups.com
Hi,

I have a large tree (thousands of nodes fully opened) inside a div with vertical scroll bar, which I'm updating when new data comes from server. While the refresh speed in acceptable, what happens is that the scroll position goes to top upon refresh, which is somewhat annoying if you're browsing a large tree.

My plan would be to tackle this with partial updates, but would there be a simpler way?

Best regars,
Santeri

Ivan Bozhanov

unread,
Nov 18, 2014, 9:37:27 AM11/18/14
to jst...@googlegroups.com
That is very odd - the scroll position should be restored, it is part of the state that is saved. Are you using a custom scrollbar?

Best regards,
Ivan

Santeri Korri

unread,
Nov 18, 2014, 2:31:40 PM11/18/14
to jst...@googlegroups.com
Ivan,

Not a custom scrollbar, but checking the code it seems scroll position is stored for element that directly contains the tree, whereas in my case the scrollable element is an ancestor of that element.

Thanks for the pointer, I guess I can always restore the position in my own code.

Best regards,
Santeri
Reply all
Reply to author
Forward
0 new messages