From b117dca242903fffa8a7f2ba42516235f7bbfa33 Mon Sep 17 00:00:00 2001 From: mhsdesign <85400359+mhsdesign@users.noreply.github.com> Date: Wed, 12 Jul 2023 10:08:32 +0200 Subject: [PATCH] BUGFIX: NodecreationDialog orange border when trying to escape with pending changes --- .../neos-ui/src/Containers/Modals/NodeCreationDialog/index.js | 2 +- packages/react-ui-components/src/Dialog/dialog.tsx | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/neos-ui/src/Containers/Modals/NodeCreationDialog/index.js b/packages/neos-ui/src/Containers/Modals/NodeCreationDialog/index.js index c86d6b6f7c..70a14357af 100644 --- a/packages/neos-ui/src/Containers/Modals/NodeCreationDialog/index.js +++ b/packages/neos-ui/src/Containers/Modals/NodeCreationDialog/index.js @@ -307,7 +307,7 @@ export default class NodeCreationDialog extends PureComponent { actions={[this.renderBackAction(), this.renderSaveAction()]} title={this.renderTitle()} onRequestClose={this.handleCancel} - preventClosing={true} + preventClosing={this.state.isDirty} type="success" isOpen style={this.state.secondaryInspectorComponent ? 'jumbo' : 'wide'} diff --git a/packages/react-ui-components/src/Dialog/dialog.tsx b/packages/react-ui-components/src/Dialog/dialog.tsx index 863efb789f..7f391b81ab 100644 --- a/packages/react-ui-components/src/Dialog/dialog.tsx +++ b/packages/react-ui-components/src/Dialog/dialog.tsx @@ -129,7 +129,7 @@ class DialogWithOverlay extends PureComponent { const finalClassNameBody = mergeClassNames( theme.dialog__body, - { + this.state.isShaking ? theme['dialog--warn'] : { [theme['dialog--success']]: type === 'success', [theme['dialog--warn']]: type === 'warn', [theme['dialog--error']]: type === 'error', @@ -201,7 +201,7 @@ class DialogWithOverlay extends PureComponent { [theme['dialog--jumbo']]: style === 'jumbo', [theme['dialog--narrow']]: style === 'narrow', }, - { + this.state.isShaking ? theme['dialog--warn'] : { [theme['dialog--success']]: type === 'success', [theme['dialog--warn']]: type === 'warn', [theme['dialog--error']]: type === 'error',