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
Ruby agile-developmentangularbcfboardsbug-trackerganttgantt-chartifcissue-trackerjira-alternativekanbanopenprojectproduct-managementproject-managementproject-planningroadmaprubyscrumtimelineworkflows
Drop modal teleportation seems to work
Benjamin Bädorf8c1ec9600b97
diff --git a/app/views/layouts/base.html.erb b/app/views/layouts/base.html.erbindex f87c0131eb1..5d8218d9762 100644--- a/app/views/layouts/base.html.erb+++ b/app/views/layouts/base.html.erb@@ -60,6 +60,7 @@ See COPYRIGHT and LICENSE files for more details.</noscript><op-toasts-container></op-toasts-container><op-modal-overlay></op-modal-overlay>+<spot-drop-modal-portal></spot-drop-modal-portal><% main_menu = render_main_menu(local_assigns.fetch(:menu_name, nil), @project) %><% side_displayed = content_for?(:sidebar) || content_for?(:main_menu) || !main_menu.blank? %><% initial_classes = initial_menu_classes(side_displayed, show_decoration) %>diff --git a/frontend/src/app/shared/components/datepicker/wp-multi-date-form/wp-multi-date-form.component.html b/frontend/src/app/shared/components/datepicker/wp-multi-date-form/wp-multi-date-form.component.htmlindex 8f9952644c5..b5f6b068eb7 100644--- a/frontend/src/app/shared/components/datepicker/wp-multi-date-form/wp-multi-date-form.component.html+++ b/frontend/src/app/shared/components/datepicker/wp-multi-date-form/wp-multi-date-form.component.html@@ -1,5 +1,4 @@<form- class="spot-modal"data-qa-selector="op-datepicker-modal"[attr.id]="htmlId"#modalContainer@@ -12,7 +11,7 @@><op-datepicker-banner [scheduleManually]="scheduleManually"></op-datepicker-banner>- <div class="spot-modal--body spot-container op-datepicker-modal op-datepicker-modal_wide">+ <div class="spot-container op-datepicker-modal op-datepicker-modal_wide"><div class="op-datepicker-modal--toggle-actions-container"><op-datepicker-scheduling-togglename="scheduleManually"diff --git a/frontend/src/app/shared/components/datepicker/wp-multi-date-form/wp-multi-date-form.component.ts b/frontend/src/app/shared/components/datepicker/wp-multi-date-form/wp-multi-date-form.component.tsindex 514f35f7ef4..e640cf68a10 100644--- a/frontend/src/app/shared/components/datepicker/wp-multi-date-form/wp-multi-date-form.component.ts+++ b/frontend/src/app/shared/components/datepicker/wp-multi-date-form/wp-multi-date-form.component.ts@@ -283,6 +283,8 @@ export class OpWpMultiDateFormComponent extends UntilDestroyedMixin implements A}ngAfterViewInit():void {+ console.log(this.modalContainer);+ debugger;const init = (date:Date|null) => {this.initializeDatepicker(date);diff --git a/frontend/src/app/spot/components/drop-modal/drop-modal.component.ts b/frontend/src/app/spot/components/drop-modal/drop-modal.component.tsindex 08750db34a5..234974b4ba7 100644--- a/frontend/src/app/spot/components/drop-modal/drop-modal.component.ts+++ b/frontend/src/app/spot/components/drop-modal/drop-modal.component.ts@@ -129,30 +129,34 @@ export class SpotDropModalComponent implements OnDestroy {) {}open() {- this._opened = true;this.repositionAnchor();this.updateAppHeight();- /**+ /** If we don't activate the body after one tick, angular will complain because* it already rendered a `null` template, but then gets an update to that* template in the same tick.* To make it happy, we update afterwards*/setTimeout(() => {- /* We have to set these listeners next tick, because they're so far up the tree.- * If the open value was set because of a click listener in the trigger slot,- * that event would reach the event listener added here and close the modal right away.- */this.teleportationService.activate(this.body)- this.teleportationService.hasRendered$- .pipe(take(1))- .subscribe(() => {- document.body.addEventListener('click', this.close);- document.body.addEventListener('keydown', this.onEscape);- document.body.addEventListener('scroll', this.repositionAnchor);- window.addEventListener('resize', this.onResizeDebounced);- window.addEventListener('orientationchange', this.onResizeDebounced);+ });++ this.teleportationService.hasRendered$+ .pipe(take(1))+ .subscribe(() => {+ this._opened = true;+ setTimeout(() => {+ /*+ * We have to set these listeners next tick, because they're so far up the tree.+ * If the open value was set because of a click listener in the trigger slot,+ * that event would reach the event listener added here and close the modal right away.+ */+ document.body.addEventListener('click', this.close.bind(this));+ document.body.addEventListener('keydown', this.onEscape.bind(this));+ document.body.addEventListener('scroll', this.repositionAnchor.bind(this), true);+ window.addEventListener('resize', this.onResizeDebounced.bind(this));+ window.addEventListener('orientationchange', this.onResizeDebounced.bind(this));setTimeout(() => {this.recalculateAlignment();