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

Bug/59281 split screen activity tab does not scroll to the right position from list view (#17210)

jjabari-ope498f67203ce
diff --git a/frontend/src/stimulus/controllers/dynamic/work-packages/activities-tab/index.controller.ts b/frontend/src/stimulus/controllers/dynamic/work-packages/activities-tab/index.controller.ts
index cf2cc74fa9b..c3a7cd3a307 100644
--- a/frontend/src/stimulus/controllers/dynamic/work-packages/activities-tab/index.controller.ts
+++ b/frontend/src/stimulus/controllers/dynamic/work-packages/activities-tab/index.controller.ts
@@ -398,7 +398,7 @@ export default class IndexController extends Controller {
}
private getScrollableContainer():HTMLElement | null {
- if (this.isWithinNotificationCenter()) {
+ if (this.isWithinNotificationCenter() || this.isWithinSplitScreen()) {
// valid for both mobile and desktop
return document.querySelector('.work-package-details-tab') as HTMLElement;
}
@@ -419,6 +419,10 @@ export default class IndexController extends Controller {
return window.location.pathname.includes(this.notificationCenterPathNameValue);
}
+ private isWithinSplitScreen():boolean {
+ return window.location.pathname.includes('work_packages/details');
+ }
+
private addEventListenersToCkEditorInstance() {
this.onSubmitBound = () => { void this.onSubmit(); };
this.adjustMarginBound = () => { void this.adjustJournalContainerMargin(); };