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

Merge branch 'dev' into bug/58685-doubled-scrollbar-on-mobile

jjabari-opab3bf00804de
diff --cc frontend/src/stimulus/controllers/dynamic/work-packages/activities-tab/index.controller.ts
index 06f62fca407,51da1617736..e6b749cf1e8
--- 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
@@@ -468,25 -467,39 +472,43 @@@ export default class IndexController ex
const ckEditorInstance = this.getCkEditorInstance();
if (ckEditorInstance && ckEditorInstance.getData({ trim: false }).length === 0) {
- this.clearEditor(); // remove potentially empty lines
- this.removeEventListenersFromCkEditorInstance();
- this.buttonRowTarget.classList.remove('d-none');
- this.formRowTarget.classList.add('d-none');
-
- if (this.journalsContainerTarget) {
- this.journalsContainerTarget.style.marginBottom = '';
- this.journalsContainerTarget.classList.add('work-packages-activities-tab-index-component--journals-container_with-initial-input-compensation');
- this.journalsContainerTarget.classList.remove('work-packages-activities-tab-index-component--journals-container_with-input-compensation');
- }
+ this.hideEditor();
+ }
+ }
- if (this.isMobile()) {
- // wait for the keyboard to be fully down before scrolling further
- // timeout amount tested on mobile devices for best possible user experience
- this.scrollInputContainerIntoView(500);
- }
+ hideEditor() {
+ this.clearEditor(); // remove potentially empty lines
+ this.removeEventListenersFromCkEditorInstance();
+ this.buttonRowTarget.classList.remove('d-none');
+ this.formRowTarget.classList.add('d-none');
+
+ if (this.journalsContainerTarget) {
+ this.journalsContainerTarget.style.marginBottom = '';
+ this.journalsContainerTarget.classList.add('work-packages-activities-tab-index-component--journals-container_with-initial-input-compensation');
+ this.journalsContainerTarget.classList.remove('work-packages-activities-tab-index-component--journals-container_with-input-compensation');
+ }
+
- if (this.isMobile()) { this.scrollInputContainerIntoView(300); }
++ if (this.isMobile()) {
++ // wait for the keyboard to be fully down before scrolling further
++ // timeout amount tested on mobile devices for best possible user experience
++ this.scrollInputContainerIntoView(500);
+ }
}
+ onBlurEditor() {
+ const ckEditorInstance = this.getCkEditorInstance();
+
+ if (ckEditorInstance && ckEditorInstance.getData({ trim: false }).length === 0) {
+ this.hideEditor();
+ } else {
+ this.adjustJournalContainerMargin();
+ }
+ }
+
+ onFocusEditor() {
+ this.adjustJournalContainerMargin();
+ }
+
async onSubmit(event:Event | null = null) {
if (this.saveInProgress === true) return;