Card Details Popup possible on desktop view

- until now a new form in the popup closed the popup itself
This commit is contained in:
Martin Filser 2021-10-19 21:27:47 +02:00
parent 48b2e3dd88
commit 8c3ce4bb73
4 changed files with 29 additions and 24 deletions

View file

@ -192,21 +192,17 @@ window.Popup = new (class {
}
})();
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',
},
);
});
}
// 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,.js-open-inlined-form',
enabledOnClick: actionName === 'close',
},
);
});