Hi, DialogButton.bind() (AP.dialog.getDialogButton().bind()) is deprecated now, but I can’t replace it with suggested Events.on() method. I use it to override default Macro Editor dialog - I do custom validation, and I need to prevent the default submit event. With the new API, I can’t do that.
Amen. I had the same problem. In the end, I set all of my dialogs to chrome: false, and created my own buttons. I don’t think there’s a pretty answer to this right now. Best we can do is signal to the Atlassian developers that there’s a bit of discomfort.
The thing is, in some cases you don’t want to disable the button, you just want the opportunity to intercept the clicking of the Submit button and have your own code determine whether the form should be submitted.
@david.pinn you’re totally right.
I’ve spoken to the team about this and it’s something that was missing from our plan.
For now, i’d stick with button.bind. I have made an issue to track this here: [ACJS-655] - Ecosystem Jira
Before button.bind is deprecated we will have implemented a solution for this.
@josh.galea i have also mentioned the confluence macro issue as part of this.