file field focus

This commit is contained in:
Yuri Kuznetsov
2022-08-11 17:58:00 +03:00
parent 36f3d040dd
commit c1f13b146d
2 changed files with 12 additions and 0 deletions
@@ -241,6 +241,10 @@ function (Dep, FileUpload) {
}, this.events || {});
},
focusOnInlineEdit: function () {
this.$el.find('.attach-file-label').focus();
},
empty: function () {
this.clearIds();
+8
View File
@@ -299,6 +299,14 @@ define('views/fields/file', ['views/fields/link', 'helpers/file-upload'], functi
}
},
focusOnInlineEdit: function () {
let $element = this.$el.find('.attach-file-label');
if ($element.length) {
$element.focus();
}
},
handleResize: function () {
let width = this.$el.width();