Skip to content

fix: remove the slash when the editor block menu is dismissed - #4334

Merged
kulmann merged 1 commit into
mainfrom
fix/editor-block-menu-stray-slash
Nov 10, 2026
Merged

kulmann merged 1 commit into
mainfrom
fix/editor-block-menu-stray-slash

Conversation

@JammingBen

Copy link
Copy Markdown
Member

Description

Clicking "+" on a block opens the block menu by inserting a "/" into the document. When the menu was dismissed without choosing an action (Esc, a click outside, or a second click on "+"), that "/" stayed in the document, often in a new paragraph of its own.

Now the "/" and the paragraph that was created for it are removed again when the menu is dismissed without running an action.

  • The user's own text is never touched: a "/" they typed themselves, an empty block that already existed, or a /word the caret or an undo moves onto.
  • Removing the "/" doesn't add an undo step, so undo can't bring it back.
  • It also works in collaborative editing.
  • "+" on a horizontal rule or an image no longer leaves an empty paragraph behind.

Related Issue

@JammingBen JammingBen self-assigned this Nov 6, 2026
@JammingBen

Copy link
Copy Markdown
Member Author

@kulmann again unsure if this is worth the ~100 LOC. What do you think - keep it, or keep the current behavior as intended one?

@kulmann

kulmann commented Nov 10, 2026

Copy link
Copy Markdown
Member

IMO this is a real UX bug and should be fixed 👍

@JammingBen
JammingBen force-pushed the fix/editor-block-menu-stray-slash branch from 4f8ef72 to e4532c6 Compare November 10, 2026 10:17
@JammingBen
JammingBen marked this pull request as ready for review November 10, 2026 10:39
@kulmann
kulmann merged commit 8667fae into main Nov 10, 2026
28 checks passed
@kulmann
kulmann deleted the fix/editor-block-menu-stray-slash branch November 10, 2026 13:38
@openclouders openclouders mentioned this pull request Nov 10, 2026
1 task
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Editor [+] Menu leaves a / in the document, when closed

2 participants