Skip to content

Commit ea6cb42

Browse files
author
p01
committed
preserve scrollTop position in the ResourceTree
1 parent 1375dfa commit ea6cb42

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/resource-manager/resource_tree_view.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ cls.ResourceTreeView = function(id, name, container_class, html, default_handler
2828
{
2929
var service = this._service;
3030
var ctx = this._service.get_resource_context();
31+
var scrollTop = container.firstElementChild?container.firstElementChild.scrollTop:0;
3132

3233
if (ctx )//&& ctx.resourcesDict && Object.keys(ctx.resourcesDict).length)
3334
{
@@ -55,6 +56,8 @@ cls.ResourceTreeView = function(id, name, container_class, html, default_handler
5556
]
5657
);
5758
}
59+
60+
container.firstElementChild.scrollTop = scrollTop;
5861
};
5962

6063
this.create_disabled_view = function(container)

0 commit comments

Comments
 (0)