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

[Beta]: Text typed at the end of a mark set to inclusive: false joins the mark

Aperta
#5,304 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à
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

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

bug target:beta

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.

  1. Open https://beta.platejs.org/examples/plite/plate-schema-descriptors and click Import Plate descriptor HTML. The editor shows Descriptor proof, bold, 22 px, with the yellow schemaAdvanced highlight. The page's policy readout is string:false:preserve:preserve-if-allowed, so inclusive is false.
  2. Click the end of Descriptor proof and press End.
  3. 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 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) 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:96 takes the marks for new text from getCurrentMarks(editor), which returns the stored marks only.
  • packages/plitejs/src/core/public-state.ts:3570 drops properties whose lifecycle says inclusive === false when 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 keeps schemaAdvanced.
  • 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

  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.