Skip to content

fix: reconcile direct-edit and plain-edit baselines to avoid false conflict dialog#3271

Open
mvanhorn wants to merge 1 commit into
nextcloud:mainfrom
mvanhorn:fix/2196-direct-edit-plain-edit-conflict
Open

fix: reconcile direct-edit and plain-edit baselines to avoid false conflict dialog#3271
mvanhorn wants to merge 1 commit into
nextcloud:mainfrom
mvanhorn:fix/2196-direct-edit-plain-edit-conflict

Conversation

@mvanhorn

Copy link
Copy Markdown

Switching a note between plain edit and rich (direct) edit repeatedly no longer triggers the Text editor's "The document has been changed outside of the editor" conflict dialog when the user made no changes.

Reported in #2196 and confirmed by multiple reporters from app version 4.2.1 (2024) through a fresh reproduction on 2026-06-30. Switching modes two or more times reliably surfaced the conflict dialog ("Use current version" / "Use the saved version") even with no content change, because the plain editor and the server-side Text (direct edit) app each carried their own baseline and a mode switch made one look stale to the other. On opening a note, the two paths now reconcile against the same saved baseline before the editor loads, so an unmodified mode switch is not treated as an outside change; the dialog still fires for genuine outside edits.

Fixes #2196

🖼️ Screenshots

No UI change — this fixes an incorrect conflict dialog that appeared during plain/rich edit mode switches. The dialog itself is unchanged; it simply no longer fires on an unmodified note.

🏚️ Before 🏡 After
Conflict dialog appears after toggling plain/rich edit on an unchanged note No dialog on an unchanged note; genuine outside edits still raise it

🏁 Checklist

  • ⛑️ Tests (unit and/or integration) are included or not needed
  • 🔙 Backport requests are created or not needed: /backport to stable-xx.x
  • 📅 Milestone is set
  • 🌸 PR title is meaningful (if it should be in the changelog: is it meaningful to users?)

🤖 AI (if applicable)

  • The content of this PR was partly or fully generated using AI

@codacy-production

Copy link
Copy Markdown

Up to standards ✅

🟢 Issues 0 issues

Results:
0 new issues

View in Codacy

🟢 Metrics 4 complexity · 0 duplication

Metric Results
Complexity 4
Duplication 0

View in Codacy

NEW Get contextual insights on your PRs based on Codacy's metrics, along with PR and Jira context, without leaving GitHub. Enable AI reviewer
TIP This summary will be updated as you push new changes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

switching between plain edit and rich edit results in a conflict

1 participant