apostrophecms / apostrophecms/apostrophe
Rich text singletons set to `readOnly` still seem editable
- Dominant language
- JavaScript
- Stars
- 4.6k
- Forks
- 650
- Avg merge
- 19h 21m
- Merged PRs (30d)
- 23
Description
**To Reproduce**
Steps to reproduce the behavior:
1. Create a piece type with a rich text singleton in its schema. Set that singleton field to `readOnly: true`.
2. When editing a piece of that type, go to that field and click to "Add Rich Text."
**Expected behavior**
There should not even be a button to add the singleton widget. You should not be able to interact with the area there.
**Describe the bug**
Singleton (and likely area) fields in editor modals do not reflect "read-only" status in the UI. When you put content in there it will not save, but it seems from the editor's point of view that it should.
Contributor guide
Research direction
Reproduce the issue by creating a piece type with a read-only rich text singleton, opening it in an editor modal, and clicking “Add Rich Text.” Trace the editor modal’s handling of singleton and area read-only state. Done means the add button is absent, the field area cannot be interacted with, and read-only content is not presented as editable.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, node.js
- Domain
- frontend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100