diff --git a/client/src/views/fields/attachment-multiple.js b/client/src/views/fields/attachment-multiple.js index 980b65faca..22ee37958e 100644 --- a/client/src/views/fields/attachment-multiple.js +++ b/client/src/views/fields/attachment-multiple.js @@ -241,6 +241,10 @@ function (Dep, FileUpload) { }, this.events || {}); }, + focusOnInlineEdit: function () { + this.$el.find('.attach-file-label').focus(); + }, + empty: function () { this.clearIds(); diff --git a/client/src/views/fields/file.js b/client/src/views/fields/file.js index 6263c59f29..ad74cfb11b 100644 --- a/client/src/views/fields/file.js +++ b/client/src/views/fields/file.js @@ -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();