chore: update tag selector

This commit is contained in:
boojack
2022-05-15 11:37:08 +08:00
parent f1cca0f298
commit e510465818
4 changed files with 16 additions and 7 deletions

View File

@ -254,7 +254,7 @@ const MemoEditor: React.FC<Props> = () => {
const handleTagSeletorClick = useCallback((event: React.MouseEvent) => {
if (tagSeletorRef.current !== event.target && tagSeletorRef.current?.contains(event.target as Node)) {
editorRef.current?.insertText((event.target as HTMLElement).textContent ?? "");
editorRef.current?.insertText((event.target as HTMLElement).textContent + " " ?? "");
toggleTagSeletor(false);
}
}, []);