케이스 ce-0037-undo-stack-cleared-ko · 시나리오 scenario-undo-redo-behavior

프로그래밍 방식으로 콘텐츠를 수정할 때 Undo 스택이 지워짐

OS: macOS Ubuntu 22.04 기기: Desktop or Laptop Any 브라우저: Safari 120.0 키보드: US 초안
undoprogrammaticsafari

현상

contenteditable 영역의 콘텐츠를 프로그래밍 방식으로 수정할 때(예: innerHTML 또는 textContent 사용) Safari에서 undo 스택이 지워집니다. 이로 인해 사용자가 이전 수동 편집을 되돌릴 수 없습니다.

재현 예시

  1. contenteditable div를 만듭니다.
  2. 수동으로 일부 텍스트를 입력합니다.
  3. JavaScript를 사용하여 콘텐츠를 수정합니다: element.innerHTML = 'New content'.
  4. 되돌리기를 시도합니다 (Cmd+Z).
  5. 이전 수동 편집을 되돌릴 수 있는지 관찰합니다.

관찰된 동작

  • macOS의 Safari에서 프로그래밍 방식 콘텐츠 변경이 undo 스택을 지웁니다.
  • 프로그래밍 방식 변경 후 사용자가 이전 수동 편집을 되돌릴 수 없습니다.
  • undo 기록이 예상치 못하게 손실됩니다.

예상 동작

  • 프로그래밍 방식 변경이 수동 편집에 대한 undo 스택을 지우지 않아야 합니다.
  • 또는 프로그래밍 방식 수정을 통해 undo 기록을 보존하는 방법이 있어야 합니다.
  • undo 스택이 더 지능적으로 관리되어야 합니다.

이 시나리오의 변형

케이스 OS 브라우저 상태
ce-0016-undo-redo-inconsistent-ko Windows 11 Edge 120.0 초안
ce-0037-undo-stack-cleared-ko macOS Ubuntu 22.04 Safari 120.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: macOS Ubuntu 22.04
Device: Desktop or Laptop Any
Browser: Safari 120.0
Keyboard: US
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.