diff --git a/themes/Ying/assets/js/modules/comment-autofill.js b/themes/Ying/assets/js/modules/comment-autofill.js index 998f72f1..4f24f46c 100644 --- a/themes/Ying/assets/js/modules/comment-autofill.js +++ b/themes/Ying/assets/js/modules/comment-autofill.js @@ -33,8 +33,11 @@ function isEmail(s) { return /^[^\s@]+@[^\s@]+\.[^\s@]{2,}$/.test(String(s || '').trim()); } function editorOf(el) { - var box = el && el.closest ? el.closest('.atk-editor') : null; - return box || null; + // 线上 Artalk 的编辑器容器是 .atk-main-editor(旧版/别处可能是 .atk-editor), + // 兜底再往上找整个 .artalk 根 —— 宁可范围大一点,也别让委托匹配不到 + return (el && el.closest) + ? el.closest('.atk-main-editor, .atk-editor, .artalk, .atk-layer-wrap') + : null; } function fieldIn(editor, name) {