attachment focus fix
This commit is contained in:
@@ -575,7 +575,16 @@ function (Dep, FileUpload) {
|
||||
|
||||
this.isUploading = false;
|
||||
|
||||
setTimeout(() => this.focusOnUploadButton(), 50);
|
||||
setTimeout(() => {
|
||||
if (
|
||||
document.activeElement &&
|
||||
document.activeElement.tagName !== 'BODY'
|
||||
) {
|
||||
return;
|
||||
}
|
||||
|
||||
this.focusOnUploadButton();
|
||||
}, 50);
|
||||
}
|
||||
})
|
||||
.catch(() => {
|
||||
|
||||
@@ -604,6 +604,13 @@ define('views/fields/file', ['views/fields/link', 'helpers/file-upload'], functi
|
||||
this.isUploading = false;
|
||||
|
||||
setTimeout(() => {
|
||||
if (
|
||||
document.activeElement &&
|
||||
document.activeElement.tagName !== 'BODY'
|
||||
) {
|
||||
return;
|
||||
}
|
||||
|
||||
let $a = this.$el.find('.preview a');
|
||||
$a.focus();
|
||||
}, 50);
|
||||
|
||||
Reference in New Issue
Block a user