Problem/Motivation
When editing a layout block with a required field (or other validation logic), it is impossible to dismiss/cancel the dialog until all validation errors are resolved. Validation should not run when cancelling the form.
Additionally, a validation error appears if other fields on the block are edited before the required field is filled in, and the instant preview does not appear until all validation errors are resolved.
Steps to reproduce
Create a custom block type with a required text field.
Begin adding a block of that type to a layout page, and then cancel the dialog before filling in the text field. The dialog cannot be dismissed.
Proposed resolution
Do not run form validation when cancelling or previewing a block. Only run it when saving the block.
Comment | File | Size | Author |
---|---|---|---|
#2 | panopoly_magic-preview_validation-3173176-2.patch | 1.24 KB | bgreco |
Comments
Comment #2
bgreco CreditAttribution: bgreco commentedComment #3
bgreco CreditAttribution: bgreco commentedComment #5
dsnopekThanks so much! This works great in my testing and fixes a super annoying issue. Committed! :-)