Skip to content

OpenProject is the leading open source project management software for product, project and portfolio management. A powerful Jira alternative with agile planning, issue tracking, roadmaps, Gantt charts, time tracking, collaboration features, and more. Available on premises or in the cloud. ⭐ Star us on GitHub

scroll to where the the selected menu item is located

bsatarnejadbfb2fb9432ac
diff --git a/frontend/src/app/globals/tree-menu.ts b/frontend/src/app/globals/tree-menu.ts
index 859b2d3951b..f53195c8838 100644
--- a/frontend/src/app/globals/tree-menu.ts
+++ b/frontend/src/app/globals/tree-menu.ts
@@ -34,7 +34,9 @@
$('[data-selected-page].tree-menu--container').each(function(_i:number, tree:HTMLElement) {
let selectedPage = $(tree).data('selected-page');
if (selectedPage) {
- $('[slug=' + selectedPage + ']', tree).toggleClass('-selected', true);
+ let selected = $('[slug=' + selectedPage + ']', tree);
+ selected.toggleClass('-selected', true);
+ selected[0].scrollIntoView();
}
});