Skip to content

Commit

Permalink
Merge pull request #1374 from NatLibFi/fix-hierarchy-scroll-position
Browse files Browse the repository at this point in the history
scroll hierarchy to selected concept instead of children
  • Loading branch information
osma authored Oct 6, 2022
2 parents fdeb484 + 683dd48 commit e4fd30e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion resource/js/hierarchy.js
Original file line number Diff line number Diff line change
Expand Up @@ -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'});
}
});
}
Expand Down

0 comments on commit e4fd30e

Please sign in to comment.