케이스 ce-0260-korean-ime-crash-firefox-ko · 시나리오 scenario-ime-korean-crash-firefox

Firefox에서 한국어 IME 컴포지션 중 특정 키 조합 시 에디터 크래시

OS: Windows 10 기기: Desktop Any 브라우저: Firefox 120+ 키보드: Korean (IME) - Microsoft IME 초안
compositionimekoreanfirefoxcrashwindows

현상

Firefox에서 Windows 10과 한국어 IME를 사용할 때, IME 컴포지션 중 특정 키 조합을 누르면 contenteditable 에디터가 크래시합니다.

재현 예시

  1. contenteditable 요소에 포커스합니다.
  2. Windows 10에서 한국어 IME(Microsoft IME)를 활성화합니다.
  3. ㅀ (QWERTY 키보드에서 f를 누른 다음 g를 입력합니다.
  4. Enter 키를 눌러 컴포지션을 확정합니다.
  5. Ctrl+Shift+Home을 누릅니다.
  6. ❌ 에디터가 크래시되어 응답하지 않습니다. 페이지를 다시 로드해야 함

관찰된 동작

  • 특정 키 조합 크래시: Ctrl+Shift+Home 조합이 에디터 크래시를 유발
  • 자바스크립트 실행 중단: 크래시 발생 시 자바스크립트 실행이 완전히 중단됨
  • 페이지 응답 없음: 에디터가 멈추고 브라우저는 사용자 입력에 응답하지 않음
  • Firefox 특유: 이 문제는 Firefox에서만 발생

예상 동작

  • 특정 키 조합에도 에디터가 크래시 없이 정상 작동해야 함
  • IME 컴포지션이 중단되더라도 에디터가 응답하지 않아야 함
  • 자바스크립트 오류를 적절히 처리하여 graceful recovery 구현해야 함

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

  • 위험한 키 조합 막기: IME 컴포지션 중 Ctrl+Shift+Home 같은 위험한 조합을 막음
  • try-catch 사용: input 이벤트 등을 try-catch로 감싸서 크래시 방지
  • 에러 보고: 크래시 발생 시 에러를 console.error로 기록하고 사용자에게 알림
  • fallback 상태: 크래시 발생 시 비상 모드로 전환하는 메커니즘 고려

코드 예시

const editor = document.querySelector('div[contenteditable]');
let isComposing = false;

// IME 상태 추적
editor.addEventListener('compositionstart', () => {
  isComposing = true;
});

editor.addEventListener('compositionend', () => {
  isComposing = false;
});

// 위험한 키 조합 막기
editor.addEventListener('keydown', (e) => {
  if (isComposing && e.ctrlKey && e.shiftKey && e.key === 'Home') {
    e.preventDefault();
    console.warn('Dangerous key combination blocked during IME composition:', e.key);
  }
});

// 크래시 방지
editor.addEventListener('input', (e) => {
  try {
    // input 처리 로직
  } catch (error) {
    console.error('Input error:', error);
    // 에러 복구 가능하면
    alert('입력 처리 중 오류가 발생했습니다. 페이지를 다시 로드하세요.');
  }
});

이 시나리오의 변형

케이스 OS 브라우저 상태
ce-0260-korean-ime-crash-firefox-ko Windows 10 Firefox 120+ 초안
ce-0261-korean-ime-crash-firefox-en-ko Windows 10 Firefox 120+ 초안

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 10
Device: Desktop Any
Browser: Firefox 120+
Keyboard: Korean (IME) - Microsoft 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.