Hi all,
I’m using frappe.confirm to show a confirm dialog, but I notice its behavior that the secondary action is also performed when clicking close button (X), or clicking outside the dialog (to close it).
Is there any way to make the secondary action perform only when clicking the seconary button? I just want when clicking close button or clicking outside to just do nothing
I’m using this simple code pattern for testing (this example the console logs ‘no’ when closing the dialog with X or clicking outside dialog):
frappe.confirm(__("Do you want to perform this operation ?"),
() => {
console.log('yes')
}, () => {
// action to perform if No is selected
console.log('no')
})