From 683dd4841cc27fbe40bca6ef201dd335bafd6af7 Mon Sep 17 00:00:00 2001 From: Osma Suominen Date: Thu, 6 Oct 2022 10:55:02 +0300 Subject: [PATCH] scroll hierarchy to selected concept instead of children --- resource/js/hierarchy.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/resource/js/hierarchy.js b/resource/js/hierarchy.js index a7ae629d2..678972950 100644 --- a/resource/js/hierarchy.js +++ b/resource/js/hierarchy.js @@ -40,7 +40,7 @@ function invokeParentTree(tree) { if ($leafProper.length > 0) { var $sidebarGrey = $(".sidebar-grey"); $sidebarGrey.jstree('select_node', $leafProper.toArray()); - $leafProper[0].scrollIntoView({block: 'center', behavior: 'smooth'}); + $leafProper.find('span')[0].scrollIntoView({block: 'center', behavior: 'smooth'}); } }); }