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

https://community.openproject.org/work_packages/59281
This commit is contained in:
jjabari-op
2024-11-18 09:21:21 +01:00
committed by GitHub
parent c7a2851ebf
commit e498f67203
@@ -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(); };