neos-ui
neos-ui copied to clipboard
BUG: Creation dialog cannot be closed after validation threw an error
Description
In a creation dialog with properties that have a validator, such as a NotEmpty validator, the dialog cannot be closed as soon as validation threw any kind of error.
Steps to Reproduce
- Configure a node type to have at least two fields in the creation dialog, at least one of them with a
NotEmptyvalidator. - Open the creation dialog. Fill in the non-mandatory field and press tab to trigger validation on the mandatory one. You now see the red validation error.
- Try using the "Back" button to close the creation dialog.
Expected behavior
The creation dialog closes.
Actual behavior
The creation dialog stays open and cannot be escaped unless you reload the whole UI.
Affected Versions
Neos: 7.3+ UI: 7.3+
Uuuups well ... Thanks ... Seems to be related or caused by https://github.com/neos/neos-ui/pull/3579
https://github.com/neos/neos-ui/assets/85400359/d0702036-191a-41ef-aaf9-16db5c87a458
Hmm i cannot reproduce this and would be also confused as i remember having tested that ^^
Could you please send a video as well and control the console log ;)
I guess @lorenzulrich wanted to close the dialog via ESC and that is not possible. But you are right, you can go a step back and close the dialog.
Exactly that was the purpose of https://github.com/neos/neos-ui/pull/3579. Especially it should not be possible to fat finger click outside and all the stuff is obliterated.
Anke already critized that escape will not force exit, or rather open an are you sure dialog:
https://github.com/neos/neos-ui/issues/3582
But i found adding yet another dialog on top of the dialog with: Do you really want to discard your pending node creation changes a bit overkill.
Thats why esc will just trigger the shake animation.
Also @lorenzulrich explicitly mentioned that the back button does not work (point 3) so i think we can close this issue as invalid?
I need to clarify that only happens when there is no "node type selector", in my exact case using https://github.com/psmb/Psmb.FlatNav with the newNodeType option.
In this case, the creation dialog is opened without opening the node type selector first (obviously).
Then you cannot use the back button (even if validation doesn't fail), but you can still click anywhere outside the modal to close the creation dialog.
As soon as any validator failed, neither of this works, so you cannot escape the modal in any way.
I'm not sure this is something to solve in FlatNav or in the Neos UI. If this didn't clarify the problem, I will record a video.