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

한글 입력 시 중복 이벤트 핸들링 #46

Open
hyesungoh opened this issue Apr 12, 2024 · 0 comments
Open

한글 입력 시 중복 이벤트 핸들링 #46

hyesungoh opened this issue Apr 12, 2024 · 0 comments
Labels

Comments

@hyesungoh
Copy link
Owner

자음과 모음을 처리하며 발생

자음과 모음을 조합 중인지를 KeyboardEvent.isComposing 으로 확인 가능

  const onKeyDown: KeyboardEventHandler<HTMLTextAreaElement> = (e) => {
    if (e.key === 'Enter') {
      e.preventDefault();

      if (e.nativeEvent.isComposing) return; // react 에서는 nativeEvent를 통해 접근 가능
    }
  };
@hyesungoh hyesungoh added the Web label Apr 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant