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
Ruby agile-developmentangularbcfboardsbug-trackerganttgantt-chartifcissue-trackerjira-alternativekanbanopenprojectproduct-managementproject-managementproject-planningroadmaprubyscrumtimelineworkflows
[60638] Opening a work package (full view) on mobile auto-scrolls to the tab row when not desired (#17939)
Behrokh Satarnejad6af552ee1bde
diff --git a/frontend/src/app/features/work-packages/components/wp-single-view-tabs/activity-panel/activity-tab.component.ts b/frontend/src/app/features/work-packages/components/wp-single-view-tabs/activity-panel/activity-tab.component.tsindex 12d58cb165b..1739a644e76 100644--- a/frontend/src/app/features/work-packages/components/wp-single-view-tabs/activity-panel/activity-tab.component.ts+++ b/frontend/src/app/features/work-packages/components/wp-single-view-tabs/activity-panel/activity-tab.component.ts@@ -26,7 +26,7 @@// See COPYRIGHT and LICENSE files for more details.//++-import { ChangeDetectionStrategy, Component, Input } from '@angular/core';+import { ChangeDetectionStrategy, Component, ElementRef, Input, ViewChild } from '@angular/core';import { WorkPackageResource } from 'core-app/features/hal/resources/work-package-resource';import { trackByProperty } from 'core-app/shared/helpers/angular/tracking-functions';import {@@ -45,9 +45,14 @@ export class WorkPackageActivityTabComponent extends ActivityPanelBaseControllerpublic trackByIdentifier = trackByProperty('identifier');+ @ViewChild('activitiesTabContent', { static: true }) public activitiesTabContentElement!:ElementRef<HTMLElement>;+ngOnInit() {const { workPackageId } = this.uiRouterGlobals.params as unknown as { workPackageId:string };this.workPackageId = (this.workPackage.id as string) || workPackageId;super.ngOnInit();+ if (window.location.hash) {+ this.activitiesTabContentElement.nativeElement.scrollIntoView();+ }}}diff --git a/frontend/src/app/features/work-packages/components/wp-single-view-tabs/activity-panel/activity-tab.html b/frontend/src/app/features/work-packages/components/wp-single-view-tabs/activity-panel/activity-tab.htmlindex 4b5a5faa808..64685c06ff5 100644--- a/frontend/src/app/features/work-packages/components/wp-single-view-tabs/activity-panel/activity-tab.html+++ b/frontend/src/app/features/work-packages/components/wp-single-view-tabs/activity-panel/activity-tab.html@@ -1,5 +1,5 @@<div id="work-package-activites-container">- <turbo-frame [src]="turboFrameSrc" id="work-package-activities-tab-content" loading="lazy">+ <turbo-frame [src]="turboFrameSrc" id="work-package-activities-tab-content" loading="lazy" #activitiesTabContent><op-content-loader viewBox="0 0 100 100"><svg:rect x="0" y="0" width="70" height="5" rx="1" />diff --git a/frontend/src/app/features/work-packages/routing/wp-full-view/wp-full-view.html b/frontend/src/app/features/work-packages/routing/wp-full-view/wp-full-view.htmlindex e42fc9b0bdd..3f0133cd1b8 100644--- a/frontend/src/app/features/work-packages/routing/wp-full-view/wp-full-view.html+++ b/frontend/src/app/features/work-packages/routing/wp-full-view/wp-full-view.html@@ -74,7 +74,7 @@</div><div class="work-packages-full-view--split-right work-packages-tab-view--overflow"><div class="work-packages--panel-inner">- <span class="hidden-for-sighted" tabindex="-1" opAutofocus [textContent]="focusAnchorLabel"></span>+ <span class="hidden-for-sighted" tabindex="-1" [textContent]="focusAnchorLabel"></span><op-wp-tabs [workPackage]="workPackage" [view]="'full'"></op-wp-tabs><div class="tabcontent"data-notification-selector='notification-scroll-container'diff --git a/frontend/src/app/features/work-packages/routing/wp-split-view/wp-split-view.component.ts b/frontend/src/app/features/work-packages/routing/wp-split-view/wp-split-view.component.tsindex 3d6fc80bfa6..9a09791f6d2 100644--- a/frontend/src/app/features/work-packages/routing/wp-split-view/wp-split-view.component.ts+++ b/frontend/src/app/features/work-packages/routing/wp-split-view/wp-split-view.component.ts@@ -134,10 +134,6 @@ export class WorkPackageSplitViewComponent extends WorkPackageSingleViewBase impthis.recentItemsService.add(wpId);}- get shouldFocus():boolean {- return this.$state.params.focus === true;- }-get activeTabComponent():Type<TabComponent>|undefined {return this.wpTabsdiff --git a/frontend/src/app/features/work-packages/routing/wp-split-view/wp-split-view.html b/frontend/src/app/features/work-packages/routing/wp-split-view/wp-split-view.htmlindex e3adad05d23..c766a1ea00e 100644--- a/frontend/src/app/features/work-packages/routing/wp-split-view/wp-split-view.html+++ b/frontend/src/app/features/work-packages/routing/wp-split-view/wp-split-view.html@@ -14,7 +14,6 @@<spanclass="hidden-for-sighted"tabindex="-1"- [opAutofocus]="shouldFocus"[textContent]="focusAnchorLabel"></span>