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

Specify scrollable container as the intended target whose bounding rectangle will be considered the viewport

Kabiru Mwenjacab44aa53a44
diff --git a/frontend/src/stimulus/controllers/dynamic/work-packages/activities-tab/infinite-scroll.controller.ts b/frontend/src/stimulus/controllers/dynamic/work-packages/activities-tab/infinite-scroll.controller.ts
index 168d3f6ca80..9ebaa44ad63 100644
--- a/frontend/src/stimulus/controllers/dynamic/work-packages/activities-tab/infinite-scroll.controller.ts
+++ b/frontend/src/stimulus/controllers/dynamic/work-packages/activities-tab/infinite-scroll.controller.ts
@@ -62,7 +62,6 @@ export default class extends BaseController {
super.connect();
void this.initializeTurboRequestService();
- useIntersection(this, { threshold: 0.25 });
this.setupScrollPreservation();
}
@@ -96,12 +95,14 @@ export default class extends BaseController {
if (!this.scrollableContainer || this.pageStreamHandler) return;
const { signal } = this.abortController;
+ const scrollContainer = this.scrollableContainer;
+
+ useIntersection(this, { root: scrollContainer });
this.pageStreamHandler = (event:TurboBeforeStreamRenderEvent) => {
event.preventDefault();
const stream = event.detail.newStream;
- const scrollContainer = this.scrollableContainer!;
if (stream.target.includes(this.insertTargetIdValue)) {
const isPrepend = stream.action === 'prepend';