I have an issue when using the rich text input field (cq/gui/components/authoring/dialog/richtext) in a dialog. Notice that I am using the rich text input field as a field of the dialog itself and not as in-place editor.
The bug happens when I am trying to add a hyperlink through the link plugin. The value of the hyperlink is required, but even if I press cancel (so I don't really add the link), the validation still occurs and I can't submit the whole dialog. I reproduced this bug on a clean AEM instance version 220.127.116.11. Do you know how to solve this issue?
I am also adding the steps to reproduce the bug.
dialog definition overview:
dialog initial state:
select text and press on the hyperlink plugin
I do not add the link and press cancel (X)
I try to submit the form, but nothing happens. Probably the validation of the whole form returns false.
Do you have separate Validation for RTE and main dialog?
These validations will be triggered when the dialog submit button is clicked. It will stop the dialog submit event first, scan through the dialog to look for fields with a validator, validate those fields and show errors, if any. If all fields are valid, it will proceed with the dialog submit event otherwise not.The selector property ties the validator to the form elements on the page.
What do you mean by separate validation? Maybe you mean custom validation?
I do not have any custom validation though, everything was tested on a vanilla instance.
The problem is that when I close the dialog of the pathbrowser of the hyperlink plugin by clicking cancel (X), the validation of the whole dialog should not consider the pathbroswer anymore (as I understand). But the validation of the dialog still calls the validation of the pathbrowser.