Skip to content

Commit

Permalink
hotfix: 태그 입력 시 마지막 글자 중복 입력 오류 해결
Browse files Browse the repository at this point in the history
  • Loading branch information
dmson1218 committed Dec 7, 2023
1 parent 0823dc0 commit a3e5624
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion FE/src/components/DiaryModal/DiaryCreateModal.js
Original file line number Diff line number Diff line change
Expand Up @@ -142,10 +142,12 @@ function DiaryCreateModal(props) {
fontSize='1rem'
placeholder='태그를 입력해주세요.'
onBlur={(e) => addTag(e)}
onKeyDown={(e) => {
onKeyPress={(e) => {
if (e.key === "Enter") {
addTag(e);
}
}}
onKeyDown={(e) => {
if (e.key === "Backspace" && e.target.value.length === 0) {
deleteLastTag();
}
Expand Down

0 comments on commit a3e5624

Please sign in to comment.