Skip to content

편집 입력의 host 소유권과 composition 수명을 보존한다 #711

Description

@developer-1px

Goal Anchor

  • Outcome: Web·contenteditable·React를 조합해도 입력은 올바른 editing host에서 한 번만 처리되고, IME 중 DOM 소유권과 종료 뒤 최신 model의 일치를 보존합니다.
  • Done:
    1. Rich Text 안의 input·textarea·select 및 별도 editable host의 keyboard/beforeinput/clipboard가 바깥 문서와 history를 변경하지 않습니다. 정상 root 입력은 유지합니다.
    2. React Rich Text surface는 composition 중 model ingestion을 계속하면서 composing DOM의 render를 유예하고, 종료·취소·target 삭제 뒤에는 최신 model로 복구합니다. 정상 typing locality를 보존합니다.
    3. 같은 editor/root에서 onAction·createId callback만 바뀌어도 진행 중 composition을 보존하고 최신 callback을 사용합니다. 실제 editor/root 변경과 unmount는 수명을 해제합니다.
    4. Rich Text replacement 입력은 data와 dataTransfer/target-range 형태를 모두 canonical semantic intent로 처리합니다. 기존 replacement/yank/transpose 처리 범위의 같은 payload 누락을 함께 닫습니다.
    5. local contenteditable은 composition tail을 timer 또는 trailing input으로 끝낼 때 지연한 최신 model과 selection을 publish하여 다음 입력이 stale DOM을 덮어쓰지 않게 합니다.
    6. RichTextEditorSurface의 public as 변경 시 제거된 root의 listener를 해제하고 새 root에 다시 연결합니다.
    7. 6건의 pre-fix 실패와 post-fix 성공, owner 회귀 테스트와 관련 build/type/문서/Site 검증으로 확인합니다. 공개 capability가 바뀌면 정본 export·owner reference·Site Usage·source registration까지 닫습니다.
  • Don't: 새 범용 Editor/store/composition framework를 만들거나 Host에 보완 로직을 넣지 않습니다. Core/Collaboration wire·schema, 전체 collaborative selection mapping/history는 변경하지 않습니다. Local replace, collaborative capture-plan-commit, Rich Text semantic Intent의 서로 다른 model 계약을 유지합니다. native 근거 미확인인 non-cancelable replacement(H1)와 composition removed-span 재변환(H2)은 제외합니다. Calendar 캘린더 콘텐츠와 플로팅 컨트롤 레이어를 분리한다 #704·Database Database saved-view와 편집 표현 책임을 정본화한다 #587·Annotation refactor(annotation): 선택·gesture·출력의 정본 경계 통합 #589 미병합 변경은 가져오지 않습니다. merge는 별도 승인 대상입니다.

승인 근거와 현상

사용자는 위 6건의 후속 리뷰와 “기존 정본 모듈에서 이 6건을 닫는다”는 개선 제안에 “진행해”로 실행을 승인했습니다.
기준은 #710 병합 후 facc55d1418b179cbf121bcf5210623b54dbf39d입니다.

  • 중첩 control에서 Backspace → 바깥 abcab로 변경됩니다.
  • IME DOM abcㅎ 중 외부 model 갱신 → React가 composing DOM을 덮어씁니다.
  • callback-only rerender → compositionend가 model에 반영되지 않습니다.
  • dataTransfer의 Xabcb 교체 → model이 abc 그대로입니다.
  • local compositionend 뒤 외부 latest commit → tail 종료 뒤에도 DOM은 이전 값입니다.
  • as article→section 교체 → 새 root 입력 listener가 없습니다.
    기존 관련 20 files / 133 tests는 통과했으나 위 6건의 synthetic 회귀 9개는 실패했습니다. 이는 native IME·system clipboard·spellchecker 지원 증거가 아닙니다.

정본 경계와 검증

  • Web: editing-host target/event 소유권 판별. 세 native binding의 동등한 판별을 한 정본 API로 소비하되 model reconciliation 자체는 합치지 않습니다.
  • Rich Text Web: input payload 번역, composition 시작/종료와 failure recovery.
  • Contenteditable: local native lease/tail release와 latest render.
  • Rich Text React: callback freshness, 실제 root 수명, composition 동안 render 유예와 catch-up.
  • Site: 기존 API의 Usage·source 등록과 실제 소비 검증만 담당합니다.

관련 정상 입력·nested control·composition 두 event 순서·외부 변경/삭제·callback/root 변경·unbind·history·typing locality를 검증합니다. 브라우저는 기존 Chrome 연결을 우선하며 native와 synthetic 증거를 구분합니다. 제품 시각/정책을 새로 설계하는 작업은 없습니다.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions