[Beta]: Text typed at the end of a mark set to inclusive: false joins the mark
I maintainer di solito rispondono entro 1 giorno
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 3/5
- Tempo stimato
- 1-2 giorni
- Idoneità per principianti
- 67/100
- Tipo di issue
- Bug
- Chiarezza
- Specificata chiaramente
- Stato di attività
- Attiva
- Stack tecnologico
- react, typescript
- Ambito
- frontend, full-stack
Direzione di ricerca
Start with packages/plitejs/src/editor/insert-text.ts and trace how it gets marks for inserted text through getCurrentMarks(editor). Compare that path with the end-of-text handling in packages/plitejs/src/core/public-state.ts. Reproduce the steps in the issue on the Plate descriptor example, then verify that typing at the mark's end leaves schemaAdvanced off the new text while bold and font size may carry over.
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/plate-schema-descriptors, Import Plate descriptor HTML gives the text Descriptor proof the schemaAdvanced mark, whose policy reads inclusive: false. Typing at the end of that text adds the new characters to the marked text node, and the yellow highlight grows over them. A mark that is not inclusive should stop at its end.
Reproduction
Repro 1: type at the end of the mark, Chromium
An agent ran this on the live Beta in headless Chromium 149 (Playwright) on 2026-10-22 (PT) and recorded it.
- Open https://beta.platejs.org/examples/plite/plate-schema-descriptors and click
Import Plate descriptor HTML. The editor showsDescriptor proof, bold, 22 px, with the yellowschemaAdvancedhighlight. The page's policy readout isstring:false:preserve:preserve-if-allowed, soinclusiveisfalse. - Click the end of
Descriptor proofand press End. - Type
Xy.
Result: the model holds one text node, Descriptor proofXy, with schemaAdvanced="proof", fontSize and bold. The highlight covers Xy.
WebKit 26.5 (Playwright) and Claude Code's built-in browser (Chromium) gave the same result. natamox confirmed it by hand on 2026-10-22 (PT). An agent replayed it on the live Beta in Chromium 149 and WebKit 26.5 on 2026-10-24 and read the same text node.
Expected
The mark is not inclusive, so Xy lands outside it, in its own text node without schemaAdvanced. Bold and the font size may carry over. The highlight stays on Descriptor proof.
Actual
Xy joins the marked text node and inherits schemaAdvanced.
Environment
- Exact
nextcommit/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) and 2026-10-24.
- Not tried in Safari itself, in Firefox, with an IME, or on a phone.
Caveat
From a reading of the code on next a32ed63c78:
packages/plitejs/src/editor/insert-text.ts:96takes the marks for new text fromgetCurrentMarks(editor), which returns the stored marks only.packages/plitejs/src/core/public-state.ts:3570drops properties whose lifecycle saysinclusive === falsewhen the caret sits at the end of a text, but the insert path does not use that result. The new text joins the existing text node and keepsschemaAdvanced.- Not tried as a code change.
Evidence
- Repro 1: the agent's recording, 0:22, real time, with the step panel on the right. The dark box at the bottom left is drawn by the test script. It shows the page's mark policy, the model's text nodes with their marks, and the highlighted text. A record number in the panel's tag line is covered.
Repro 1 — Chromium 149, /examples/plite/plate-schema-descriptors
https://github.com/user-attachments/assets/c3c221ca-fc7c-4667-a710-a04da6a73440
Related
- #5307: another bug in this example, an inline link that renders as a block.
- Lingua principale
- TypeScript
- Stelle
- 16.6k
- Fork
- 993
- Merge medio
- 20h 1m
- PR unite (30g)
- 60
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
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di udecode/plate
-
bug target:beta triaged
Difficoltà 2/5 1-3 ore Idoneità per principianti 84/100
I maintainer di solito rispondono entro 1 giorno
-
bug plugin:link target:beta triaged
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
I maintainer di solito rispondono entro 1 giorno
-
bug mobile target:beta triaged
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
I maintainer di solito rispondono entro 1 giorno
-
[Beta]: The docs Demo example page starts with an empty editorForse già presa @natamox l’ha presa oggi. Apertabug target:beta triaged
Difficoltà 2/5 1-3 ore Idoneità per principianti 84/100
I maintainer di solito rispondono entro 1 giorno
-
bug target:beta triaged
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di udecode/plate
Issue simili
-
DRY stats column groupingsApertaready
Difficoltà 2/5 1-3 ore Idoneità per principianti 63/100
wheresrhys/totf#1214 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
CodeChefVIT/ffcs#281 ·
I maintainer di solito rispondono entro 2 giorni
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 83/100
endora-commerce/endora-commerce#451 ·
I maintainer di solito rispondono entro 1 giorno
-
enhancement
Difficoltà 2/5 1-3 ore Idoneità per principianti 65/100
vetro-protocol/vetro-monorepo#1007 ·
I maintainer di solito rispondono entro 1 giorno