Recently, I discovered that the event show.bs.modal is triggered not only when the modal itself is shown, but also every time you call the .show() method for an element within the modal.
To attach the event handler, you would typically use the following code:
$('#modalName').on('show.bs.modal', function(event) { ... });
Do you have any suggestions on how to ensure that the code inside this handler is only executed when the modal is shown?
This issue can be particularly problematic when using formValidator.io within the modal, as it triggers the .show() method for elements once a form field fails validation.