进行了一些小修复
This commit is contained in:
1 parent
bfc16de962
commit
1f84e6aa18
3 files changed
+11
-3
No files matched your search
@@ -149,6 +149,11 @@
|
|||||||
box-shadow: 0 18px 60px rgba(0, 0, 0, 0.2);
|
box-shadow: 0 18px 60px rgba(0, 0, 0, 0.2);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.aksrt-editor-media__dialog:focus {
|
||||||
|
outline: 0;
|
||||||
|
box-shadow: 0 18px 60px rgba(0, 0, 0, 0.2);
|
||||||
|
}
|
||||||
|
|
||||||
.aksrt-editor-media__close {
|
.aksrt-editor-media__close {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
z-index: 2;
|
z-index: 2;
|
||||||
|
|||||||
@@ -110,7 +110,7 @@
|
|||||||
root.innerHTML =
|
root.innerHTML =
|
||||||
'<button type="button" class="aksrt-editor-media__backdrop" data-editor-media-close tabindex="-1" aria-label="' +
|
'<button type="button" class="aksrt-editor-media__backdrop" data-editor-media-close tabindex="-1" aria-label="' +
|
||||||
escapeAttr(i18n.close || '关闭') + '"></button>' +
|
escapeAttr(i18n.close || '关闭') + '"></button>' +
|
||||||
'<div class="aksrt-editor-media__dialog">' +
|
'<div class="aksrt-editor-media__dialog" tabindex="-1">' +
|
||||||
'<button type="button" class="aksrt-editor-media__close" data-editor-media-close aria-label="' +
|
'<button type="button" class="aksrt-editor-media__close" data-editor-media-close aria-label="' +
|
||||||
escapeAttr(i18n.close || '关闭') + '">×</button>' +
|
escapeAttr(i18n.close || '关闭') + '">×</button>' +
|
||||||
'<h3 id="aksrt-editor-media-title" class="aksrt-editor-media__title">' +
|
'<h3 id="aksrt-editor-media-title" class="aksrt-editor-media__title">' +
|
||||||
@@ -268,9 +268,9 @@
|
|||||||
};
|
};
|
||||||
activeModal = { root: root, onKeydown: onKeydown };
|
activeModal = { root: root, onKeydown: onKeydown };
|
||||||
document.addEventListener('keydown', onKeydown);
|
document.addEventListener('keydown', onKeydown);
|
||||||
var focusTarget = root.querySelector('[data-editor-media-tab].is-active');
|
var focusTarget = root.querySelector('.aksrt-editor-media__dialog');
|
||||||
if (focusTarget) {
|
if (focusTarget) {
|
||||||
focusTarget.focus();
|
focusTarget.focus({ preventScroll: true });
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -65,6 +65,9 @@ test('front submit image and visibility actions live in the TinyMCE toolbar', ()
|
|||||||
assert.match(editor, /type:\s*'menubutton'/);
|
assert.match(editor, /type:\s*'menubutton'/);
|
||||||
assert.match(editor, /data-editor-media-tab="upload"/);
|
assert.match(editor, /data-editor-media-tab="upload"/);
|
||||||
assert.match(editor, /data-editor-media-tab="external"/);
|
assert.match(editor, /data-editor-media-tab="external"/);
|
||||||
|
assert.match(editor, /class="aksrt-editor-media__dialog" tabindex="-1"/);
|
||||||
|
assert.match(editor, /querySelector\('\.aksrt-editor-media__dialog'\)/);
|
||||||
|
assert.doesNotMatch(editor, /focusTarget\s*=\s*root\.querySelector\('\[data-editor-media-tab\]\.is-active'\)/);
|
||||||
assert.match(editor, /\(cfg\.uploads \|\| \{\}\)\.image/);
|
assert.match(editor, /\(cfg\.uploads \|\| \{\}\)\.image/);
|
||||||
assert.match(page, /'canUploadImage'\s*=>\s*!empty\(\$ctx\['can_upload_img'\]\)/);
|
assert.match(page, /'canUploadImage'\s*=>\s*!empty\(\$ctx\['can_upload_img'\]\)/);
|
||||||
assert.doesNotMatch(main, /newposts-editor-tools|data-insert-shortcode|data-insert-upload-image/);
|
assert.doesNotMatch(main, /newposts-editor-tools|data-insert-shortcode|data-insert-upload-image/);
|
||||||
|
|||||||
Reference in new issue
Block a user