From 1dead8b0806483992c4c715aa7ce64bf84e1aaf7 Mon Sep 17 00:00:00 2001 From: Pierre Donias Date: Fri, 15 May 2020 16:24:16 +0200 Subject: [PATCH] feat(xo-web/modal/form): don't close on click or escape (#5002) See xoa-support#2469 When the user clicks outside of a form modal or presses escape, don't close the modal as all the information they entered so far will be lost. --- CHANGELOG.unreleased.md | 1 + packages/xo-web/src/common/modal.js | 2 ++ 2 files changed, 3 insertions(+) diff --git a/CHANGELOG.unreleased.md b/CHANGELOG.unreleased.md index 70b3d88fd..c39c7a7d6 100644 --- a/CHANGELOG.unreleased.md +++ b/CHANGELOG.unreleased.md @@ -11,6 +11,7 @@ - [XOA/licenses] Display proxy licenses (PR [#4944](https://github.com/vatesfr/xen-orchestra/pull/4944)) - [Network selector] Display pool's name [#4885](https://github.com/vatesfr/xen-orchestra/issues/4885) (PR [#4990](https://github.com/vatesfr/xen-orchestra/pull/4990)) - [Usage report] Include CSV raw data files to the sent email [#4970](https://github.com/vatesfr/xen-orchestra/issues/4970) (PR [#4979](https://github.com/vatesfr/xen-orchestra/pull/4979)) +- [Modal] Don't close pop-up forms when you click outside or press escape (PR [#5002](https://github.com/vatesfr/xen-orchestra/pull/5002)) ### Bug fixes diff --git a/packages/xo-web/src/common/modal.js b/packages/xo-web/src/common/modal.js index 172a2cb53..db3b79042 100644 --- a/packages/xo-web/src/common/modal.js +++ b/packages/xo-web/src/common/modal.js @@ -368,7 +368,9 @@ export const FormModal = decorate([ injectState, ({ state, effects }) => (