From bc6ef583fb1a04a55d4f683ea59262d668a4c62d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=B0=A2=E6=80=9D?= <2897217417@qq.com> Date: Wed, 13 Oct 2021 16:01:38 +0800 Subject: [PATCH] atwho --- src/modules/tpm/challengesnew/tpm-md-editor.js | 1 + 1 file changed, 1 insertion(+) diff --git a/src/modules/tpm/challengesnew/tpm-md-editor.js b/src/modules/tpm/challengesnew/tpm-md-editor.js index a8243879..9d174a65 100644 --- a/src/modules/tpm/challengesnew/tpm-md-editor.js +++ b/src/modules/tpm/challengesnew/tpm-md-editor.js @@ -231,6 +231,7 @@ export default ({ mdID, onChange, onCMBeforeChange, onCMBlur, error = false, cla document.onkeydown = (e) => { if (e.key === "@") { // 输入@键后在对应的位置显示可选的项目成员 + const selection = window.getSelection().anchorOffset; setAtWhoVisible(true); }else{ setAtWhoVisible(false);