Undoing a block move into a multi-column layout removes the block until a second undo
Maintainer antworten meist innerhalb von 1 Tag
Bewertung
- Schwierigkeit
- 3/5
- Geschätzter Aufwand
- 1-2 Tage
- Anfängerfreundlichkeit
- 45/100
- Issue-Typ
- Bug
- Klarheit
- Größtenteils klar
- Aktivitätsstatus
- Aktiv
- Tech-Stack
- react, typescript
Rechercherichtung
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.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Beschreibung
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 💖
- Vorherrschende Sprache
- TypeScript
- Sterne
- 10.3k
- Forks
- 777
- Ø Merge
- 2 T. 18 Std.
- Gemergte PRs (30 T.)
- 41
Entwicklungsumgebung
- Kein Dockerfile und keine Docker-Compose-Datei
- Hat eine Pull-Request-Vorlage
- Beitragsleitfaden lesen
Erste Schritte
- Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
- Forken Sie das Repository und arbeiten Sie in einem Branch.
- Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.
Mehr aus TypeCellOS/BlockNote
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 82/100
TypeCellOS/BlockNote#2949 · 1 Kommentar ·
Maintainer antworten meist innerhalb von 1 Tag
-
a11y
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 68/100
TypeCellOS/BlockNote#2855 ·
Maintainer antworten meist innerhalb von 1 Tag
-
a11y
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 62/100
TypeCellOS/BlockNote#2829 · 1 Kommentar ·
Maintainer antworten meist innerhalb von 1 Tag
-
Comment thread actions: hover-only controls and unlabeled buttons in ThreadsSidebaEvtl. vergeben Ein verknüpfter Pull Request ist offen oder bereits gemergt. Offena11y
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 72/100
TypeCellOS/BlockNote#2824 ·
Maintainer antworten meist innerhalb von 1 Tag
-
needs-triage
Schwierigkeit 3/5 Ein halber Tag Anfängerfreundlichkeit 62/100
TypeCellOS/BlockNote#3209 ·
Maintainer antworten meist innerhalb von 1 Tag
Alle Issues in TypeCellOS/BlockNote
Ähnliche Issues
-
`cf complete zsh >> .zshrc` fails on vanilla zshEvtl. wieder frei Ein Pull Request dazu wurde ohne Merge geschlossen. Offen
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 75/100
cloudflare/cf#340 ·
Maintainer antworten meist innerhalb von 1 Tag
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 72/100
-
Rename Madson cameraOffen
Schwierigkeit 2/5 Unter einer Stunde Anfängerfreundlichkeit 75/100
StoDevX/AAO-React-Native#8785 ·
Maintainer antworten meist innerhalb von 1 Tag
-
Broken links in the docsOffen
Schwierigkeit 1/5 Unter einer Stunde Anfängerfreundlichkeit 75/100
-
bnv-manager-v2: accept_invite creates the Mailcow domain admin before the commitEvtl. vergeben @myOmikron hat das heute übernommen. Offenbug ready-for-agent
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 82/100