케이스 ce-0002-ime-enter-breaks-ko · 시나리오 scenario-ime-interaction-patterns

contenteditable 내부에서 Enter 키 입력 시 컴포지션이 취소됨

OS: Windows 11 기기: Desktop or Laptop Any 브라우저: Chrome 120.0 키보드: Korean (IME) 초안
compositionimeenter

현상

contenteditable 요소에서 IME로 한국어 텍스트를 컴포지션할 때 Enter 키를 누르면 컴포지션이 취소되고 때로는 부분적인 음절만 커밋됩니다. 일부 브라우저와 IME 조합에서 캐럿은 다음 줄로 이동하지만 마지막으로 컴포지션된 문자가 손실됩니다.

재현 예시

  1. 편집 가능한 영역에 포커스합니다.
  2. 한국어 IME를 활성화합니다.
  3. 여러 음절을 입력하지만 컴포지션을 완료하지 않습니다.
  4. Enter 키를 눌러 새 줄을 삽입합니다.

관찰된 동작

  • compositionend 이벤트가 불완전한 데이터로 발생합니다.
  • 캐럿이 다음 줄로 이동합니다.
  • 마지막으로 컴포지션된 음절이 DOM 텍스트 콘텐츠에서 누락됩니다.

예상 동작

  • IME가 줄바꿈을 삽입하기 전에 현재 컴포지션을 완료해야 합니다.
  • 마지막으로 컴포지션된 음절이 DOM 텍스트 콘텐츠에 남아 있어야 합니다.

참고사항 및 가능한 해결 방향

  • 플레이그라운드에서 beforeinput, compositionend, input 이벤트의 시퀀스를 관찰합니다.
  • 브라우저가 compositionend 전후에 inputType = 'insertParagraph'를 가진 beforeinput 이벤트를 발생시키는지 확인합니다.
  • 가능한 해결 방법은 keydown에서 Enter를 가로채고 컴포지션이 완료될 때까지 기본 동작을 방지하는 것이지만, 이는 네이티브 편집 동작을 변경하므로 제품별로 신중하게 평가해야 합니다.

이 시나리오의 변형

케이스 OS 브라우저 상태
ce-0002-ime-enter-breaks-ko Windows 11 Chrome 120.0 초안
ce-0004-ime-backspace-removes-whole-syllable-ko WindowsmacOSAndroidiOSLinux Any ChromeEdgeSafariFirefox Latest 확인됨
ce-0022-ime-enter-breaks-firefox-ko Windows 11 Firefox 120.0 초안
ce-0030-backspace-composition-chrome-ko macOS Ubuntu 22.04 Chrome 120.0 초안
ce-0035-backspace-deletes-whole-word-ko macOS Ubuntu 22.04 Safari 120.0 초안
ce-0042-input-events-duplicate-ko Windows 11 Edge 120.0 초안
ce-0058-contenteditable-with-autocomplete-ko macOS Ubuntu 22.04 Chrome 120.0 초안
ce-0070-contenteditable-with-autocapitalize-ko iOS 17.0 Safari 17.0 초안
ce-0071-contenteditable-with-autocorrect-ko iOS 17.0 Safari 17.0 초안
ce-0181-japanese-ime-enter-breaks-chrome-ko Windows 11 Chrome 120.0 초안
ce-0182-chinese-ime-enter-breaks-safari-ko macOS 14.0 Safari 17.0 초안
ce-0185-japanese-ime-backspace-granularity-chrome-ko Windows 11 Chrome 120.0 초안
ce-0186-chinese-ime-backspace-granularity-safari-ko macOS 14.0 Safari 17.0 초안
ce-0195-thai-ime-enter-breaks-chrome-ko Windows 11 Chrome 120.0 초안
ce-0196-vietnamese-ime-enter-breaks-edge-ko Windows 11 Edge 120.0 초안
ce-0199-thai-ime-backspace-granularity-chrome-ko Windows 11 Chrome 120.0 초안
ce-0200-vietnamese-ime-backspace-granularity-edge-ko Windows 11 Edge 120.0 초안
ce-0217-keyboard-handlers-iscomposing-false-ios-safari-korean-ko iOS 17.0+ Safari 17.0+ 초안
ce-0565-chrome-121-oninput-offset-0-ko Windows 11 Chrome 121.0.6167.86 확인됨
ce-0579-ko macOS 15.0 (Sequoia) 모든 브라우저 (ProseMirror 문맥) 최신 (2025년 11월) 확인됨
ce-0581-ko Android 14.0 / 15.0 Chrome 131.0+ 확인됨

Playground for this case

Use the reported environment as a reference and record what happens in your environment while interacting with the editable area.

Reported environment
OS: Windows 11
Device: Desktop or Laptop Any
Browser: Chrome 120.0
Keyboard: Korean (IME)
Your environment
Sample HTML:
Event log
Use this log together with the case description when filing or updating an issue.
0 events
Interact with the editable area to see events here.