Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

[Beta]: In the Plite hidden content blocks example, newly typed text in the first line disappears when a block opens or closes

Aperta
#5,303 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
55/100
Tipo di issue
Bug
Chiarezza
Specificata chiaramente
Stato di attività
Attiva
Stack tecnologico
react, typescript
Ambito
frontend, testing

Direzione di ricerca

Start with packages/plitejs/src/react/components/editable-text-flow.tsx, especially the reconcile(false) layout effect and the saved entries described in the issue; then inspect the hidden blocks example at apps/www/src/app/(app)/examples/plite/_examples/hidden-content-blocks.tsx. Reproduce by typing at the end of the first line and expanding Accordion body in Chromium or WebKit. Done means the text stays visible and clicking at the end places the caret after it; the issue names no test file.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

Testing lane

  • Repository: udecode/plate
  • Branch: next
  • Release channel: Beta
  • Exact commit/package version: NOT_ENOUGH_INFO

Summary

On https://beta.platejs.org/examples/plite/hidden-content-blocks, text typed at the end of the first line disappears from the page as soon as any block expands or collapses, or the Details tab changes. The model still holds the text. A click on the line brings it back, but the caret lands before it, so the next keystroke goes in the middle.

Reproduction

Repro 1: type, then open and close blocks, Chromium

An agent ran this on the live Beta in headless Chromium 149 (Playwright) on 2026-10-22 (PT) and recorded it.

  1. Open https://beta.platejs.org/examples/plite/hidden-content-blocks. Click the end of the first line, Intro visible before hidden blocks., and type 111111.
  2. Click Accordion body to expand it.
  3. Click Accordion body again to collapse it.
  4. Click the Details tab, then Overview.
  5. Click the end of the first line on the page.
  6. Type X.

Results:

  • Steps 2 to 4: the page shows Intro visible before hidden blocks., while the model holds Intro visible before hidden blocks.111111. Waiting 1.5 s does not bring the text back.
  • Step 5: 111111 shows again, but the model caret is at offset 35, the end of the old text, before 111111.
  • Step 6: the line becomes Intro visible before hidden blocks.X111111.

Clicking only Collapsible note, only switching the Details tab, or using the toolbar's Accordion button gives the same result. WebKit 26.5 (Playwright) gives the same result too.

The find comes from natamox's own screen recording, and natamox confirmed it by hand on 2026-10-22 (PT). The browser of that recording was not noted.

Repro 2: replay

An agent replayed steps 1 and 2 on the live Beta in headless Chromium 149 and WebKit 26.5 on 2026-10-24. In both engines the first line read Intro visible before hidden blocks.111111 after typing and Intro visible before hidden blocks. after the Accordion opened.

Expected

The first line keeps showing 111111 while other blocks open and close, and a click at the end of the line puts the caret after 111111.

Actual

As listed under Results. The page shows stale text, and the next edit lands in the middle of the line.

Environment

  • Exact next commit/Beta package version: NOT_ENOUGH_INFO. The page does not show its build.
  • Repro 1: Chromium 149.0.7827.55 and WebKit 26.5 (Playwright, headless) on macOS, 2026-10-22 (PT).
  • Repro 2: the same engines, 2026-10-24.
  • Not tried in Safari itself or on a phone. Firefox does not launch headless on this machine.

Caveat

From a reading of the code on next a32ed63c78:

  • The example's Element (apps/www/src/app/(app)/examples/plite/_examples/hidden-content-blocks.tsx:473) reads every block's open state from React.useContext(HiddenBlocksContext) (:483). A state change re-renders every block, the first paragraph included.
  • Plite writes the text itself through EditableTextFlow in packages/plitejs/src/react/components/editable-text-flow.tsx. After that re-render, its layout effect calls reconcile(false) (:1913), which paints from the text saved at the last React render (entriesRef, :1767). Only the default, reconcile(true) (:1784), reads the live model. Native typing does not re-render the line, so the saved text is still the old text.
  • A probe saw the same text container element throughout, so the line was not remounted.
  • So the bug may sit in Plite's React layer. Any element that re-renders for an outside reason after native typing could paint old text. This was not checked on other pages or tried as a code change.

Evidence

  • Repro 1: the agent's recording, 0:33, real time, with the step panel on the right. The dark box at the bottom left is drawn by the test script. It prints the model's first line and the page's first line, and turns red when they differ.
Repro 1 — Chromium 149, /examples/plite/hidden-content-blocks

https://github.com/user-attachments/assets/7fa0ce85-8c3a-4c34-8258-733323a570dd

Related

  • #5269 covers undo doing nothing in this example, among 16. Its cause differs.
Lingua principale
TypeScript
Stelle
16.6k
Fork
993
Merge medio
20h 1m
PR unite (30g)
61

Preparare l'ambiente

Questo progetto non fornisce container di sviluppo, Dockerfile né guida per i contributori, quindi l'ambiente è a tuo carico: parti dal suo README e consulta la nostra guida al primo contributo per i passaggi generali.

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di udecode/plate

Tutte le issue di udecode/plate

Issue simili

Altre issue su TypeScript

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.