file field focus
This commit is contained in:
@@ -241,6 +241,10 @@ function (Dep, FileUpload) {
|
||||
}, this.events || {});
|
||||
},
|
||||
|
||||
focusOnInlineEdit: function () {
|
||||
this.$el.find('.attach-file-label').focus();
|
||||
},
|
||||
|
||||
empty: function () {
|
||||
this.clearIds();
|
||||
|
||||
|
||||
@@ -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();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user