Merge pull request #7581 from opf/fix/30814/scroll-menu-item-into-view

[30814] Scroll selected menu item into view

[ci skip]
pull/7586/head
Oliver Günther 5 years ago committed by GitHub
commit a2a0e9017b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 9
      frontend/src/app/components/main-menu/main-menu-navigation.service.ts

@ -68,6 +68,13 @@ export class MainMenuNavigationService {
// Wrap main item
this.wrapMainItem();
// Scroll to the active item
const selected = jQuery('.main-item-wrapper a.selected');
if (selected.length > 0) {
selected[0].scrollIntoView();
}
// Recreate toggler
const toggler = this.recreateToggler();
@ -78,8 +85,6 @@ export class MainMenuNavigationService {
this.navigationEvents$.next(active || activeRoot);
}
jQuery('#main-menu li:has(ul) .main-item-wrapper > a').not('ul ul a')
// 1. unbind the current click functions
.unbind('click')

Loading…
Cancel
Save