I have a form in a modal. The form validation trigger event is a ‘blur’. When the modal open i set the focus in the first input component. When i click ‘Cancel’ on the modal, and the focus is on any input, the modal isn’t closing, but i give an error message, because the field is invalid (there is a validation rule on the field). After second click (because the focus now isn’t on any input) the modal is close normally. Of course at Cancel i don’t want to validate a form. How can i do it?
- I don’t found any callback handler where i can get the event to check who send it
- I add click event handler to the cancel button, but it didn’t help.