dialog.disableCloseOnSubmit() and AUI 8.5.1


I’m having an issue with AP.dialog.disableCloseOnSubmit(). Previously I was using AUI version 6.0.9 and everything was working ok. The dialog is registered in atlassian connect and the submit action validates some data in a form, does an asynchronous request and then emits an event that’s captured by the page that’s opening the dialog.

Then I decided to update AUI to 8.5.1 with the library available on unpkg.com. I’ve added all the JS and CSS files from there along with a newer version of jQuery (3.3.1). But the problem is that the form validation no longer works nor does the event get fired. Which makes me suspect that disableCloseOnSubmit() isn’t working properly. I haven’t touched that part of code and it’s the standard code for it:

    AP.events.on('dialog.button.click', async (data) => {
        if (data.button.name === 'submit') {

Has anyone noticed such an issue?