fix(web): inline styles inheritance in newline#663
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Fixes a regression after the Tiptap upgrade where pressing Enter inside inline-styled text could incorrectly deactivate the active inline mark for the new line (e.g., bold not being inherited).
Changes:
- Update
StrictMarksPluginto only run its strict-mark reconciliation when the document or selection actually changes. - Add a Playwright E2E regression test covering Enter-in-the-middle-of-bold-followed-by-plain-text, ensuring bold remains active and typed text is bold.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
src/web/pmPlugins/StrictMarksPlugin.ts |
Avoids running strict-mark reconciliation on transactions that don’t change doc/selection, preventing incorrect stored-mark resets after Enter. |
.playwright/tests/strictMarks.spec.ts |
Adds an E2E regression test validating bold inheritance/activation when inserting a newline mid-bold before plain text. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
exploIF
approved these changes
Jun 29, 2026
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.
Summary
After tiptap upgrade: #655 when adding a newline inside e.g. bolded text caused that in newline inline style was wrongly inactive.
This PR fixes that behaviour.
Test Plan
Bold should still be active and text in second line should be bolded.
Screenshots / Videos
before:
Screen.Recording.2026-06-29.at.08.19.29.mov
after:
Screen.Recording.2026-06-29.at.08.18.24.mov
Compatibility
Checklist