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

[Beta]: In Firefox, tabbing to Keep selection visible on the Selection docs page scrolls the demo sentence out of the preview

Aperta
#5,267 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
58/100
Tipo di issue
Bug
Chiarezza
Abbastanza chiara
Stato di attività
Attiva
Stack tecnologico
react, typescript
Ambito
frontend

Direzione di ricerca

Start with apps/www/src/registry/examples/inactive-selection-demo.tsx and reproduce the reported Tab behavior in Firefox on /docs/selection; the issue says the existing browser test at apps/www/tests/browser/transient-editor-geometry.spec.ts runs the demo outside the docs preview. Trace what scrolls the preview when focus moves to the button, then verify the selected sentence and inactive selection remain visible after Tab.

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

Descrizione

bug firefox target:beta

Testing lane

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

Summary

On /docs/selection in Firefox, selecting the sentence in the demo under Inactive selection and pressing Tab to the Keep selection visible button makes the sentence disappear from the preview. The text is still in the page, but the preview has scrolled and cuts it off, so the kept selection the demo is meant to show cannot be seen. Sin found this while testing the Selection guide.

Reproduction

Repro 1: /docs/selection, Firefox
  1. Open https://beta.platejs.org/docs/selection in Firefox and scroll to the Inactive selection section.
  2. In the demo preview, select the sentence Select this sentence, then move focus to either control.
  3. Press Tab, so focus moves to the Keep selection visible button.

After step 3 the sentence is gone from the preview. The Keep selection visible and Clear selection paint buttons now show at the bottom of the preview.

An agent reproduced it 5 times out of 5 on 2026-10-21, the last four on reloaded pages. Its reading of the page after Tab: the sentence is still in the DOM, and its computed color, visibility and opacity have not changed. An ancestor with overflow: hidden has clientHeight 648, scrollHeight 702 and scrollTop 54, which puts the line above the clipped edge.

Sin, who tested this page, confirmed by hand on 2026-10-23 (Beijing time) that the sentence disappears from the preview after these steps. Sin made no new recording then, and the DOM reading above is the agent's, not Sin's.

Expected

The selected sentence stays visible in the preview when focus moves to Keep selection visible. The section says that Plate renders an inactive selection when focus moves to a marked control, and the button is that control in the demo, so the sentence and its inactive selection should stay in view. Sin's row records the same expectation.

Actual

The preview scrolls by 54 px and cuts the sentence off. The inactive selection cannot be seen.

Environment

  • Exact next commit/Beta package version: NOT_ENOUGH_INFO
  • Repro 1: Firefox 158, on 2026-10-21. An agent drove the real browser through computer use on Sin's side. The operating system was not recorded.
  • Sin's hand retest: 2026-10-23 (Beijing time). The browser and its version were not recorded.
  • Only Firefox was tested. Nobody has tried Chrome, Safari or a phone.

Caveat

  • Nobody has traced what starts the scroll. From a reading of the code on next, the demo fixes the editor at 650 px tall (apps/www/src/registry/examples/inactive-selection-demo.tsx:27) and puts the two buttons below it. The 702 px content height, the 648 px preview frame and the 54 px scroll are the agent's measurements. That moving focus to the button makes Firefox scroll the frame to bring the button into view is an inference.
  • The run could not check the inactive highlight or the collapsed caret paint, because the preview cuts them off. It makes no claim about lost text or about the selection itself.
  • The browser test apps/www/tests/browser/transient-editor-geometry.spec.ts runs this demo at /blocks/inactive-selection-demo, not inside the docs page preview, so it does not cover this.
  • Closed #5127 also hid a selected range while focus was elsewhere, in the comments composer. The page and the cause differ.

Evidence

  • Repro 1: a 13-second clip built from the agent's Firefox window captures. The left half is a still of the demo before Tab, and the right half shows the same demo, retimed. Each half has an enlarged box of the sentence area. At 0:01 the sentence is selected on the right. At 0:03, after Tab, the sentence is gone from the right preview and its enlarged box is empty, and the two buttons show at the bottom. This holds to the end.
Repro 1 — Firefox, /docs/selection

https://github.com/user-attachments/assets/48768988-a1b3-4b2c-9e9c-8bba33f46e48

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.