fix attachment field focus

This commit is contained in:
Yuri Kuznetsov
2022-08-12 13:45:34 +03:00
parent 207794e168
commit b50d56f884
3 changed files with 10 additions and 2 deletions
@@ -382,7 +382,7 @@ function (Dep, FileUpload) {
let $attachments = this.$attachments;
let removeLink = '<a role="button" class="remove-attachment pull-right">'+
let removeLink = '<a role="button" tabindex="0" class="remove-attachment pull-right">'+
'<span class="fas fa-times"></span></a>';
let previewHtml = this.getBoxPreviewHtml(name, type, id);
+1 -1
View File
@@ -635,7 +635,7 @@ define('views/fields/file', ['views/fields/link', 'helpers/file-upload'], functi
addAttachmentBox: function (name, type, id) {
this.$attachment.empty();
let removeLink = '<a role="button" class="remove-attachment pull-right">' +
let removeLink = '<a role="button" tabindex="0" class="remove-attachment pull-right">' +
'<span class="fas fa-times"></span></a>';
let previewHtml = this.getBoxPreviewHtml(name, type, id);
+8
View File
@@ -1876,6 +1876,14 @@ label.attach-file-label {
.attachment-preview {
vertical-align: top;
margin: 3px 0 3px 0;
> a[data-action="showImagePreview"] {
display: inline-block;
&:focus-visible {
outline-offset: 1px;
}
}
}
.field > .attachment-block-container > .attachment-block > .attachment-preview {