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

fix scroll behavior on mobile

Jonas Jabari6b8aa9cab26e
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 3174beeb4c8..c5dc0af346c 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
@@ -377,7 +377,17 @@ export default class IndexController extends Controller {
const inputContainer = this.getInputContainer() as HTMLElement;
setTimeout(() => {
if (inputContainer) {
- inputContainer.scrollIntoView({ behavior: 'smooth' });
+ if (this.sortingValue === 'desc') {
+ inputContainer.scrollIntoView({
+ behavior: 'smooth',
+ block: 'nearest',
+ });
+ } else {
+ inputContainer.scrollIntoView({
+ behavior: 'smooth',
+ block: 'start',
+ });
+ }
}
}, timeout);
}