Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[HOTFIX] 할 일 앤터로 입력 시 마지막 글자가 한 번 더 입력되는 버그 수정 #261

Merged
merged 4 commits into from
Jul 19, 2024

Conversation

seong-hui
Copy link
Member

@seong-hui seong-hui commented Jul 19, 2024

작업 내용 🧑‍💻

  • 할 일 앤터로 입력 시 마지막 글자가 한 번 더 입력되는 버그 수정하였습니다.

알게된 점 🚀

기록하며 개발하기!

  • 한글을 입력할 때만 마지막 글자가 한 번 더 입력되는 오류가 발생했는데 크롬 브라우저에서 한글을 사용하는 경우, 한글 입력 시 입력 중인 글자 아래 검은 밑줄이 생기는데 해당 밑줄이 있는 상황에서 키보드 이벤트 발생 시 이벤트핸들러가 두 번 호출 되는 문제가 존재한다고 합니다. 한글의 경우 자음과 모음의 조합으로 한 음절이 만들어지는 조합 문자이기 때문에 글자가 조합 중인지, 조합이 끝난 상태인지를 알 수 없기 때문에 발생하는 오류였습니다.
  • 해당 문제를 해결하기 위해 키보드 이벤트에 isComposing을 통해 입력 문자가 조합 문자인지 아닌지를 boolean값으로 반환하는 프로퍼티가 있었고 이를 통해서 조합문자일때만 이벤트를 호출하도록 코드를 추가하였습니다.
  • !e.nativeEvent.isComposing

관련 이슈

close #256

스크린샷 (선택)

Copy link
Contributor

@Kjiw0n Kjiw0n left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

오오 진짜 신기하네요 굳굳

Copy link
Member

@wrryu09 wrryu09 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

우와 신기합니다!!

Copy link
Member

@jeeminyi jeeminyi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

조합문자 진짜 레전드 신기하네요 굿굿

@seong-hui seong-hui merged commit 9d9c882 into develop Jul 19, 2024
2 checks passed
@seong-hui seong-hui deleted the hotfix/#256/enter-error branch July 19, 2024 19:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

[HOTFIX] 할 일 앤터로 입력 시 마지막 글자가 한 번 더 입력되는 버그 수정
4 participants