Skip to content

fix(previewOptions): only render link preview options if editor is editable#8404

Merged
silverkszlo merged 1 commit intostable31from
fix/linkPreview-in-readOnly-mode
Mar 23, 2026
Merged

fix(previewOptions): only render link preview options if editor is editable#8404
silverkszlo merged 1 commit intostable31from
fix/linkPreview-in-readOnly-mode

Conversation

@silverkszlo
Copy link
Copy Markdown
Collaborator

@silverkszlo silverkszlo commented Mar 23, 2026

📝 Summary

This previous fix #8257 did not resolve the bug entirely as sometimes it appeared and sometimes not. Now editor.options.editable is being checked in props.decorations on every view render, including after sedEditable(), regardless of whether a transaction was dispatched.

To reproduce:

  • Add a link to a document
  • create a public share of this document wird view only permissions
  • open that share in another browser (as a non-logged in user)
  • preview options of the link should not be editable at all

🏁 Checklist

  • Code is properly formatted (npm run lint / npm run stylelint / composer run cs:check)
  • Sign-off message is added to all commits
  • Tests (unit, integration and/or end-to-end) passing and the changes are covered with tests
  • Documentation (README or documentation) has been updated or is not required

…itable

Signed-off-by: silver <s.szmajduch@posteo.de>
@codecov
Copy link
Copy Markdown

codecov bot commented Mar 23, 2026

Codecov Report

❌ Patch coverage is 33.33333% with 2 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
src/plugins/previewOptions.js 33.33% 2 Missing ⚠️

📢 Thoughts on this report? Let us know!

@silverkszlo silverkszlo merged commit df77302 into stable31 Mar 23, 2026
61 of 62 checks passed
@silverkszlo silverkszlo deleted the fix/linkPreview-in-readOnly-mode branch March 23, 2026 12:18
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.

2 participants