Skip to content

fix: Backspace in empty block deletes previous block #1505

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Mar 19, 2025

Conversation

Martinrsts
Copy link
Contributor

@Martinrsts Martinrsts commented Mar 6, 2025

This suggestion is for resolving some weird behaviour with the backspace like: Fixes #605 Fixes #1478 .
Also, when a block is empty and backspace is clicked, it makes more sense to remove the block as seen in here:

Old behaviour:
https://github.com/user-attachments/assets/85669900-267a-4f1f-8642-57585d2a77dd

New behaviour:
https://github.com/user-attachments/assets/9f7a8eff-83e0-4e06-af58-cdc275c162d6

Copy link

vercel bot commented Mar 6, 2025

@Martinrsts is attempting to deploy a commit to the TypeCell Team on Vercel.

A member of the Team first needs to authorize it.

Copy link

vercel bot commented Mar 6, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated (UTC)
blocknote ✅ Ready (Inspect) Visit Preview Mar 19, 2025 6:50pm
blocknote-website ✅ Ready (Inspect) Visit Preview Mar 19, 2025 6:50pm

@matthewlipski
Copy link
Collaborator

Thanks for this! The change is nice, though I ended up re-writing it to make it clearer what's happening and sort out some edge cases.

@matthewlipski matthewlipski changed the title fix: removes current block instead of prev block if current block is … fix: Backspace in empty block deletes previous block Mar 19, 2025
@matthewlipski matthewlipski merged commit 9cd16c0 into TypeCellOS:main Mar 19, 2025
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants