Skip to content

Commit

Permalink
fix: only focus on first input if form is new
Browse files Browse the repository at this point in the history
  • Loading branch information
prssanna committed Apr 1, 2021
1 parent 09b9c9e commit 4fb544c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion frappe/public/js/frappe/form/form.js
Original file line number Diff line number Diff line change
Expand Up @@ -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()
]);
Expand Down

0 comments on commit 4fb544c

Please sign in to comment.