Issue with dialog box button


I guess there’s a bug in custom dialog box. I have created a button in dialog box via custom script named “Send” on clicking the button its doing its task but also working when clicking away from the button (in same horizontal line).

1 Like

Tried on a new doctype too.

Here’s the code:

var dialog = new frappe.ui.Dialog({
fields: [
{"fieldtype": "Button", "label":"Click Me", "fieldname": "butn"}
console.log('button pressed');