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

[Beta]: In the Plite mentions example, typing @r at the end of the document shows no candidate list

Aperta
#5,299 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
72/100
Tipo di issue
Bug
Chiarezza
Specificata chiaramente
Stato di attività
Attiva
Stack tecnologico
react, typescript
Ambito
frontend, testing

Direzione di ricerca

Start in apps/www/src/app/(app)/examples/plite/_examples/mentions.tsx around line 243, where the match uses state.points.after(start), and trace how the target and candidate list are set when the caret is at the document end. Reproduce the issue in the Plite mentions example, then check that typing @r at the end opens candidates and ↓ then Enter inserts a mention; confirm the existing middle-of-line behavior still works.

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/mentions, typing @r at the end of the document opens no candidate list, and ↓ then Enter leave the plain text @r and start a new line. Typing @r in the middle of the same line opens the list. On https://www.slatejs.org/examples/mentions, the same keys at the end of the document show R2-D2 and the other matches and insert @R2-KT.

Reproduction

Repro 1: @r at the end of the document, Chromium

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

  1. Open https://beta.platejs.org/examples/plite/mentions with its default content.
  2. Click in the last line, Try mentioning characters, like …, and press End. The caret is now at the end of the document, after the Mace Windu mention.
  3. Type Space, @ and r, one key at a time.
  4. Press ↓, then Enter.
  5. For comparison, click after characters, in the same line and type Space, @ and r.

Results:

  • Step 3: no candidate list is on the page.
  • Step 4: the line ends with the plain text @r, and a new empty paragraph follows it.
  • Step 5: the list opens with R2-D2, R2-KT, R3-S6 and more.
Repro 2: Safari and Chrome

The steps 1 to 4 of Repro 1, earlier:

  • An agent in Safari 27.0.1 on 2026-10-20, with Slate's example beside it. Beta showed no list, and Slate inserted @R2-KT.
  • An agent in Chrome 155 on 2026-10-20 (PT). The same scripted keys on Slate's example opened the list and inserted @R2-KT, so the script is not the cause.
  • natamox retested by hand on 2026-10-21 (PT) and confirmed it.

An earlier reading of the code also expected the list to stay off screen in the middle of a line. On 2026-10-24 the list showed there, so this issue covers only the end of the document.

Expected

At @r a list of matching characters opens wherever the caret is, and ↓ then Enter insert a mention, as on Slate's mentions example.

Actual

At the end of the document the list never opens, and @r stays plain text.

Environment

  • Exact next commit/Beta package version: NOT_ENOUGH_INFO. The page does not show its build.
  • Repro 1: Chromium 149.0.7827.55 (Playwright, headless) on macOS, 2026-10-24.
  • Repro 2: Safari 27.0.1 and Chrome 155 on macOS, 2026-10-20.
  • Not tried in Firefox or on a phone.

Caveat

From a reading of the code on next a32ed63c78: the example builds its match from the text before the caret and the text after it. apps/www/src/app/(app)/examples/plite/_examples/mentions.tsx:243 takes state.points.after(start), the point after the caret. At the end of the document there is no such point, so the after-text match is missing, the target is never set and the list does not render. Slate's example builds the same range with Editor.range(editor, start, after), which still returns a range when after is undefined. Not tried as a code change.

Evidence

  • Repro 1: the agent's recording, 0:27, real time, with the step panel on the right. The dark box at the bottom left is drawn by the test script. It shows whether a list holding R2-D2 exists outside the editor, and the end of the last paragraph. Typing starts at 0:05, ↓ and Enter are at 0:09, and the comparison in the middle of the line starts at 0:13.
Repro 1 — Chromium 149, /examples/plite/mentions

https://github.com/user-attachments/assets/45d19cea-1124-4722-b844-8df393f4e05f

Related

  • #5244 covers IME input over a selection, with this example as one of its pages. Its cause differs.
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.