From 5f58ede7e371b3c6314907291bbb596d8f8fc03e Mon Sep 17 00:00:00 2001 From: Martin Filser Date: Mon, 18 Oct 2021 13:06:57 +0200 Subject: [PATCH] Card Details Popup, edit of Checklist, Checklistitems and Description now works - problem is that if a inlined-form is opened within a popup, the popup is closed first --- client/lib/popup.js | 30 +++++++++++++++++------------- 1 file changed, 17 insertions(+), 13 deletions(-) diff --git a/client/lib/popup.js b/client/lib/popup.js index cae226594..cffeb266c 100644 --- a/client/lib/popup.js +++ b/client/lib/popup.js @@ -192,17 +192,21 @@ window.Popup = new (class { } })(); -// We close a potential opened popup on any left click on the document, or go -// one step back by pressing escape. -const escapeActions = ['back', 'close']; -escapeActions.forEach(actionName => { - EscapeActions.register( - `popup-${actionName}`, - () => Popup[actionName](), - () => Popup.isOpen(), - { - noClickEscapeOn: '.js-pop-over,.js-open-card-title-popup', - enabledOnClick: actionName === 'close', - }, - ); +Meteor.startup(() => { + if (!Utils.isMiniScreen()) { + // We close a potential opened popup on any left click on the document, or go + // one step back by pressing escape. + const escapeActions = ['back', 'close']; + escapeActions.forEach(actionName => { + EscapeActions.register( + `popup-${actionName}`, + () => Popup[actionName](), + () => Popup.isOpen(), + { + noClickEscapeOn: '.js-pop-over,.js-open-card-title-popup', + enabledOnClick: actionName === 'close', + }, + ); + }); + } });