进行了一些小修复

This commit is contained in:
kate522 committed 2026-08-26 17:32:26 +08:00
1 parent bfc16de962
commit 1f84e6aa18
3 files changed
+11 -3

No files matched your search

+3 -3
View File
@@ -110,7 +110,7 @@
root.innerHTML =
'<button type="button" class="aksrt-editor-media__backdrop" data-editor-media-close tabindex="-1" aria-label="' +
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="' +
escapeAttr(i18n.close || '关闭') + '">&times;</button>' +
'<h3 id="aksrt-editor-media-title" class="aksrt-editor-media__title">' +
@@ -268,9 +268,9 @@
};
activeModal = { root: root, onKeydown: 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) {
focusTarget.focus();
focusTarget.focus({ preventScroll: true });
}
}