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

Take care that the datepicker scrolls on mobile

Henriette Darge796378171b01
diff --git a/app/components/work_packages/date_picker/dialog_content_component.html.erb b/app/components/work_packages/date_picker/dialog_content_component.html.erb
index 6e2ba410d1f..510b69854b5 100644
--- a/app/components/work_packages/date_picker/dialog_content_component.html.erb
+++ b/app/components/work_packages/date_picker/dialog_content_component.html.erb
@@ -1,13 +1,14 @@
<%=
content_tag("turbo-frame", id: "wp-datepicker-dialog--content") do
component_wrapper(data: { "application-target": "dynamic",
- controller: "work-packages--date-picker--preview" }) do
+ controller: "work-packages--date-picker--preview" },
+ class: "wp-datepicker-dialog--content") do
component_collection do |collection|
if schedulable? && has_relations?
collection.with_component(WorkPackages::DatePicker::BannerComponent.new(work_package:, manually_scheduled: schedule_manually))
end
- collection.with_component(Primer::Alpha::Dialog::Body.new(classes: "wp-datepicker-dialog--content")) do
+ collection.with_component(Primer::Alpha::Dialog::Body.new(classes: "wp-datepicker-dialog--body")) do
render(Primer::Alpha::UnderlinePanels.new(label: I18n.t("work_packages.datepicker_modal.tabs.aria_label"),
classes: "wp-datepicker-dialog--UnderlineNav")) do |component|
component.with_tab(selected: true, id: "wp-datepicker-dialog--content-tab--dates") do |tab|
diff --git a/app/components/work_packages/date_picker/dialog_content_component.sass b/app/components/work_packages/date_picker/dialog_content_component.sass
index a4227a8c1fb..99f9dffd102 100644
--- a/app/components/work_packages/date_picker/dialog_content_component.sass
+++ b/app/components/work_packages/date_picker/dialog_content_component.sass
@@ -1,18 +1,28 @@
-.wp-datepicker-dialog
-
- @media screen and (min-width: $breakpoint-sm)
- &--content
+@media screen and (min-width: $breakpoint-sm)
+ .wp-datepicker-dialog
+ &--body
// We set a fixed height for this dialog zo avoid that it jumps around when the tabs are switched or errors shown
min-height: 525px
min-width: 600px
- @media screen and (max-width: $breakpoint-sm)
+@media screen and (max-width: $breakpoint-sm)
+ .wp-datepicker-dialog
&--UnderlineNav
display: none !important
- &--content
+ &--body
padding-top: var(--stack-padding-normal)
&--form-block
flex-direction: column !important
align-items: flex-start !important
row-gap: 1rem
+
+ // re-implement the scrolling behaviour. Due to the turbo-frame element in between the default Dialog body scrolling does not work
+ .wp-datepicker-dialog--content
+ display: flex
+ flex-direction: column
+ overflow: auto
+
+ .wp-datepicker-dialog--content,
+ #wp-datepicker-dialog--content
+ height: inherit