Undoing a block move into a multi-column layout removes the block until a second undo
Mantenedores costumam responder em até 1 dia
Avaliação
- Dificuldade
- 3/5
- Tempo estimado
- 1-2 dias
- Facilidade para iniciantes
- 45/100
- Tipo de issue
- Bug
- Clareza
- Razoavelmente clara
- Status de atividade
- Ativa
- Stack de tecnologia
- react, typescript
Direção de pesquisa
Start in src/extensions/DropCursor/multiColumnHandleDropPlugin.ts, where the drop handler removes the dragged block and then rewrites the column structure in separate editor calls. Check how editor.transact() groups steps for undo, and look for an existing test covering multi-column drops to extend. Done when one undo after a drop restores the original document with the block visible.
Escrita pelo modelo de indexação a partir do texto da issue.
Descrição
What’s broken?
When I drag a block to the left or right of another block to create a multi-column layout, undoing the move once makes the moved block disappear from the document. Undoing a second time restores the block to its original position.
What did you expect to happen?
A single undo should revert the entire drag-and-drop operation and restore the document to its original state, with the moved block visible in its original position.
Steps to reproduce
- Create a document with at least two blocks.
- Use a block's drag handle to move it to the left or right of another block, creating a multi-column layout.
- Trigger Undo once (for example, by clicking the editor's Undo button or calling
editor.undo()). - Observe that the moved block disappears.
- Trigger Undo again and observe that the block returns to its original position.
BlockNote version
0.55.0 (@blocknote/[email protected])
Environment
Chrome on macOS; exact browser version not recorded.
Additional context
In src/extensions/DropCursor/multiColumnHandleDropPlugin.ts, the drop handler removes the dragged block and then updates or replaces the column structure using separate editor operations. This appears to split a single drag-and-drop action into multiple undo-history steps. In a local patch, wrapping the removal and column update/replacement in editor.transact() made one undo restore the original document.
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 💖
- Linguagem predominante
- TypeScript
- Estrelas
- 10.3k
- Forks
- 777
- Merge médio
- 3d 6h
- PRs com merge (30d)
- 44
Preparar o ambiente
- Sem Dockerfile nem arquivo Docker Compose
- Tem um modelo de pull request
- Ler o guia de contribuição
Primeiros passos
- Leia a issue inteira e depois o guia de contribuição do projeto.
- Comente na issue dizendo que vai assumir — evita que duas pessoas façam o mesmo trabalho.
- Faça um fork do repositório e trabalhe em uma branch.
- Abra um pull request que referencie o número da issue.
Mais de TypeCellOS/BlockNote
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 82/100
TypeCellOS/BlockNote#2949 · 1 comentário ·
Mantenedores costumam responder em até 1 dia
-
a11y
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 68/100
TypeCellOS/BlockNote#2855 ·
Mantenedores costumam responder em até 1 dia
-
a11y
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 62/100
TypeCellOS/BlockNote#2829 · 1 comentário ·
Mantenedores costumam responder em até 1 dia
-
Comment thread actions: hover-only controls and unlabeled buttons in ThreadsSidebaTalvez já em andamento Um pull request vinculado a esta issue está aberto ou já foi mesclado. Abertaa11y
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 72/100
TypeCellOS/BlockNote#2824 ·
Mantenedores costumam responder em até 1 dia
-
tryParseMarkdownToBlocks throws on a numbered or check list item that starts with <details>Talvez já em andamento @jkugsiya assumiu há 2 dias. Aberta
Dificuldade 4/5 3-5 dias Facilidade para iniciantes 45/100
TypeCellOS/BlockNote#3189 · 2 comentários ·
Mantenedores costumam responder em até 1 dia
Todas as issues de TypeCellOS/BlockNote
Issues semelhantes
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 76/100
melgarafael/DeskcommCRM#3000 ·
Mantenedores costumam responder em até 1 dia
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 70/100
callstackincubator/simlock#639 ·
Mantenedores costumam responder em até 1 dia
-
bug
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 80/100
aws/agentcore-cli#2606 ·
Mantenedores costumam responder em até 1 dia
-
🐛 [BUG] - FeatureComparisonTable text-only cells are top-aligned while icon cells are centeredAberta
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 76/100
Mantenedores costumam responder em até 7 dias
-
ai-driven-qa bug Cosmetic
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 74/100
Mantenedores costumam responder em até 1 dia