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

Check for defaultPrevented before closing modal

Oliver Günther6b5f3b79bdf9
diff --git a/frontend/src/app/shared/components/modal/modal.service.ts b/frontend/src/app/shared/components/modal/modal.service.ts
index 070fc4034c8..571ddd3b11c 100644
--- a/frontend/src/app/shared/components/modal/modal.service.ts
+++ b/frontend/src/app/shared/components/modal/modal.service.ts
@@ -54,7 +54,7 @@ export class OpModalService {
) {
// Listen to keystrokes on window to close context menus
window.addEventListener('keydown', (evt:KeyboardEvent) => {
- if (evt.key !== 'Escape') {
+ if (evt.key !== 'Escape' || evt.defaultPrevented) {
return;
}