fix: Check if there is any active element
This commit is contained in:
parent
da50263c1e
commit
3fb9a27875
1 changed files with 6 additions and 4 deletions
|
|
@ -251,10 +251,12 @@ frappe.ui.form.Layout = class Layout {
|
|||
this.refresh_section_collapse();
|
||||
}
|
||||
|
||||
document.activeElement.focus();
|
||||
|
||||
if (document.activeElement.tagName == 'INPUT') {
|
||||
document.activeElement.select();
|
||||
if (document.activeElement) {
|
||||
document.activeElement.focus();
|
||||
|
||||
if (document.activeElement.tagName == 'INPUT') {
|
||||
document.activeElement.select();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue