focus for create modal

This commit is contained in:
Yuri Kuznetsov
2022-07-31 19:56:45 +03:00
parent 48811450a8
commit 58e006cdde
+9 -1
View File
@@ -168,7 +168,15 @@ define('views/record/edit', ['views/record/detail'], function (Dep) {
}
if (this.options.focusForCreate) {
this.once('after:render', () => this.focusForCreate());
this.once('after:render', () => {
if (this.$el.closest('.modal').length) {
setTimeout(() => this.focusForCreate(), 50);
return;
}
this.focusForCreate();
});
}
},