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 mouse events bug while a modal is open

bsatarnejad2d476414f90f
diff --git a/frontend/src/app/shared/components/modal/modal-overlay.sass b/frontend/src/app/shared/components/modal/modal-overlay.sass
index 32f92dc01a9..148b0eccb5c 100644
--- a/frontend/src/app/shared/components/modal/modal-overlay.sass
+++ b/frontend/src/app/shared/components/modal/modal-overlay.sass
@@ -9,7 +9,6 @@
justify-content: center
align-items: center
display: none
- pointer-events: none
> *
pointer-events: all
@@ -19,3 +18,6 @@
&_not-full-screen
background: transparent
+
+ &-parent_deactive
+ pointer-events : none
\ No newline at end of file
diff --git a/frontend/src/app/shared/components/modal/modal.service.ts b/frontend/src/app/shared/components/modal/modal.service.ts
index 59beec128ce..ae6ec907560 100644
--- a/frontend/src/app/shared/components/modal/modal.service.ts
+++ b/frontend/src/app/shared/components/modal/modal.service.ts
@@ -95,6 +95,9 @@ export class OpModalService {
const ref:ComponentRef<OpModalComponent> = this.bodyPortalHost.attach(portal) as ComponentRef<OpModalComponent>;
const instance = ref.instance as T;
this.active = instance;
+ if (this.portalHostElement.parentElement) {
+ this.portalHostElement.parentElement.classList.add('op-modal-overlay-parent_deactive');
+ }
this.portalHostElement.classList.add('op-modal-overlay_active');
if (notFullScreen) {
this.portalHostElement.classList.add('op-modal-overlay_not-full-screen');
@@ -127,6 +130,9 @@ export class OpModalService {
this.active.closingEvent.emit(this.active);
this.bodyPortalHost.detach();
this.portalHostElement.classList.remove('op-modal-overlay_active');
+ if (this.portalHostElement.parentElement) {
+ this.portalHostElement.parentElement.classList.remove('op-modal-overlay-parent_deactive');
+ }
this.portalHostElement.classList.remove('op-modal-overlay_not-full-screen');
this.active = null;
}