Cmd+A doesn't work when a document starts with checkboxes

Ouverte
#2,973 1 commentaire 0 réactions 0 personnes assignées Voir sur GitHub

Personne n'a encore pris cette issue.

Évaluation

Difficulté
3/5
Temps estimé
1-2 jours
Accessibilité débutants
55/100
Type d'issue
Bug
Clarté
Plutôt claire
Activité
Calme
Stack technique
react, typescript
Domaine
frontend

Piste de recherche

Start by reproducing the issue in the BlockNote editor with a checkbox as the first block, then trace the Cmd+A and Backspace selection/deletion behavior. Add regression coverage for this document shape and verify that deleting all content leaves only the default empty block.

Rédigé par le modèle d'indexation à partir du texte de l'issue.

Description

What’s broken?

When a document starts with one or more checkbox blocks, Cmd+A followed by Backspace does not correctly clear the document content.

The issue appears to be specific to documents where a checkbox is the first block. Instead of selecting and deleting the entire document content as expected, the editor gets into a state where the content cannot be fully erased using Cmd+A + Backspace.

A screen recording demonstrating the issue is available here:

https://jam.dev/c/ac0cac24-b097-406e-8e72-f9dd43948e70

What did you expect to happen?

Pressing Cmd+A and then Backspace should select and delete all content in the document, including checkbox blocks, leaving an empty document with the default empty block.

Steps to reproduce
  1. Create a new BlockNote document.
  2. Add a checkbox block as the first block in the document.
  3. Add some additional content below it, such as text or more checkbox blocks.
  4. Focus the editor.
  5. Press Cmd+A to select all document content.
  6. Press Backspace.
  7. Observe that the document content cannot be fully deleted.

The issue can be seen in this recording:

https://jam.dev/c/ac0cac24-b097-406e-8e72-f9dd43948e70

BlockNote version

No response

Environment

No response

Additional context

No response

Contribution
  • I'd be interested in contributing a fix for this issue
Sponsor
  • I'm a sponsor and would appreciate if you could look into this sooner than later 💖
Langage dominant
TypeScript
Étoiles
10.2k
Forks
772
Merge moyen
3 j 11 h
PR mergées (30 j)
17

Guide de contribution

Ouvrir le guide de contribution

Par où commencer

  1. Lisez l'issue en entier, puis le guide de contribution du projet.
  2. Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
  3. Forkez le dépôt et travaillez sur une branche.
  4. Ouvrez une pull request qui référence le numéro de l'issue.

Autres issues de TypeCellOS/BlockNote

Toutes les issues de TypeCellOS/BlockNote

Issues similaires

Plus d'issues TypeScript

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.