116404: Apply focus on first item

(cherry picked from commit 2152bab717)
This commit is contained in:
Alexandre Vryghem
2024-07-05 16:02:42 +02:00
committed by github-actions[bot]
parent b9b1d3fd8d
commit eb93041c5b
2 changed files with 11 additions and 5 deletions

View File

@@ -92,9 +92,12 @@ export class MenuSectionComponent implements OnInit, OnDestroy {
/**
* Activate this section
* @param {Event} event The user event that triggered this method
* @param skipEvent Weather the event should still be triggered after deactivating the section or not
*/
activateSection(event: Event) {
event.preventDefault();
activateSection(event: Event, skipEvent = true): void {
if (skipEvent) {
event.preventDefault();
}
if (!this.section.model?.disabled) {
this.menuService.activateSection(this.menuID, this.section.id);
}