Merge pull request #12758 from prssanna/form-input-focus

fix: only focus on first input if form is new
This commit is contained in:
mergify[bot] 2021-04-01 07:22:57 +00:00 committed by GitHub
commit 906790ec8a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -451,7 +451,7 @@ frappe.ui.form.Form = class FrappeForm {
return this.script_manager.trigger("onload_post_render");
}
},
() => this.focus_on_first_input(),
() => this.is_new() && this.focus_on_first_input(),
() => this.run_after_load_hook(),
() => this.dashboard.after_refresh()
]);