Skip to content

Tiptap RTE: Resolves inline blocks being set as dirty (closes #17749)#21546

Merged
nielslyngsoe merged 4 commits intomainfrom
v17/bugfix/rte-block-inline-dirty
Jan 28, 2026
Merged

Tiptap RTE: Resolves inline blocks being set as dirty (closes #17749)#21546
nielslyngsoe merged 4 commits intomainfrom
v17/bugfix/rte-block-inline-dirty

Conversation

@leekelleher
Copy link
Member

Description

Resolves #17749.

Whilst PR #17692 did fix issue #17749, it was re-opened with a subsequent issue, in that if a Block (configured with "Display Inline") was added to the RTE, it would set the contents as dirty, prompting the "Unsaved Changes" modal.

This PR resolves this by moving the displayInline logic from the Block Layout to getting the configuration from the Block Type instead.

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR resolves issue #17749 where adding inline blocks to the Tiptap Rich Text Editor incorrectly marks content as dirty, triggering unnecessary "Unsaved Changes" dialogs.

Changes:

  • Moved displayInline determination from runtime layout modification to block type configuration lookup
  • Removed automatic layout property setting that was causing dirty state
  • Deprecated layout-based displayInline property in favor of block type configuration
  • Simplified block observation by removing unnecessary distinctUntilChanged operator (deduplication is already handled by UmbDeepState)

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.

File Description
block.tiptap-api.ts Added block types observation and changed inline block detection to use block type config instead of layout, eliminating layout mutations that triggered dirty state
types.ts Deprecated displayInline on UmbBlockRteLayoutModel in favor of block type configuration
block-rte-manager.context.ts Removed code that automatically set displayInline on layout during block creation, preventing unwanted modifications
block-rte-entry.context.ts Removed displayInlineCorrection logic that synced layout with config, as it's no longer needed; kept deprecated observable for backwards compatibility

…/block.tiptap-api.ts

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@nielslyngsoe nielslyngsoe enabled auto-merge (squash) January 28, 2026 09:18
@nielslyngsoe nielslyngsoe merged commit 5485a31 into main Jan 28, 2026
28 checks passed
@nielslyngsoe nielslyngsoe deleted the v17/bugfix/rte-block-inline-dirty branch January 28, 2026 09:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

v15.1.0-rc | Content with Rich Text Editor always dirty

2 participants

Comments