fix: block typing over the divider block#3502
Merged
dielduarte merged 4 commits intoMay 13, 2026
Merged
Conversation
Contributor
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
🦋 Changeset detectedLatest commit: 4346632 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
commit: |
bd14cd6 to
b8f60f6
Compare
dielduarte
commented
May 13, 2026
Contributor
There was a problem hiding this comment.
cubic analysis
No issues found across 5 files
Confidence score: 5/5
- Automated review surfaced no issues in the provided summaries.
- No files require special attention.
Linked issue analysis
Linked issue: DEV-632: It's possible to just type over the divider
| Status | Acceptance criteria | Notes |
|---|---|---|
| ✅ | Prevent transactions that insert content (typing) from replacing a horizontal rule when the divider is node-selected | A ProseMirror plugin was added that filters transactions when the selection is a NodeSelection on a 'horizontalRule' and rejects ReplaceStep instances that insert content. Tests were added asserting typing does not replace the divider. |
| ✅ | Hide the bubble menu by default when the divider (horizontalRule) is active/selected (while preserving the ability to override via hideWhenActiveNodes) | The bubble-menu trigger now returns false when the current selection is a NodeSelection whose node type is included in hideWhenActiveNodes. The default hideWhenActiveNodes was updated to include 'horizontalRule' in both the example and EmailEditor, preserving the prop override behavior. |
Auto-approved: This PR adds a ProseMirror plugin to block typing over the divider while still allowing deletion, with updated bubble menu defaults and tests, all within the email editor's isolated extension system.
5c43711 to
2553f65
Compare
gabrielmfern
approved these changes
May 13, 2026
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2553f65 to
4346632
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
This PR adds a new ProseMirror plugin to the divider extension that blocks any transactions adding content (like type) over the divider.
I also had to update the bubble trigger to stop appearing in this case, so by default it's now the button and divider, but the user can override it by passing the prop
hideWhenActiveNodesas before.Video showing it working:
https://www.loom.com/share/cf524b2cba48449b91931fdf5532dc4e
Summary by cubic
Blocks typing over the divider (
horizontalRule) and hides the bubble menu when it’s selected to prevent accidental edits. Addresses Linear DEV-632.horizontalRuleis node-selected; Backspace still deletes it.NodeSelection; the menu hides whenhorizontalRuleis selected.BubbleMenuhideWhenActiveNodesto['button', 'horizontalRule'].Written for commit 4346632. Summary will update on new commits.