[MGNLUI-7270] Disable save action when showing versions of content in detail subapp Created: 21/Jun/22 Updated: 27/Feb/23 Resolved: 02/Nov/22 |
|
| Status: | Closed |
| Project: | Magnolia UI |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | 6.3, 6.2.26 |
| Type: | Bug | Priority: | Neutral |
| Reporter: | Roberto Gaona | Assignee: | Antonín Juran |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | RichTextField | ||
| Σ Remaining Estimate: | Not Specified | Remaining Estimate: | Not Specified |
| Σ Time Spent: | 3d 6.5h | Time Spent: | 3d 2.5h |
| Σ Original Estimate: | Not Specified | Original Estimate: | Not Specified |
| Attachments: |
|
|||||||||||||||||||||||||
| Issue Links: |
|
|||||||||||||||||||||||||
| Sub-Tasks: |
|
|||||||||||||||||||||||||
| Template: |
|
|||||||||||||||||||||||||
| Acceptance criteria: |
Empty
|
|||||||||||||||||||||||||
| Task DoD: |
[X]*
Doc/release notes changes? Comment present?
[X]*
Downstream builds green?
[X]*
Solution information and context easily available?
[X]*
Tests
[X]*
FixVersion filled and not yet released
[ ] 
Architecture Decision Record (ADR)
|
|||||||||||||||||||||||||
| Bug DoR: |
[X]*
Steps to reproduce, expected, and actual results filled
[X]*
Affected version filled
|
|||||||||||||||||||||||||
| Release notes required: |
Yes
|
|||||||||||||||||||||||||
| Date of First Response: | ||||||||||||||||||||||||||
| Epic Link: | Nucleus Quality Maintenance | |||||||||||||||||||||||||
| Sprint: | Nucleus 22 | |||||||||||||||||||||||||
| Story Points: | 3 | |||||||||||||||||||||||||
| Team: | ||||||||||||||||||||||||||
| Description |
|
Steps to reproduce: 1 - Modify on demo: /dam-app-jcr/dialogs/uploadAndEdit.yaml and set the description field to type RichText 2 - Publish any asset from the assets app 3 - Access "Show versions" and choose the previously published version. You will see how you can edit the richTextField, although can't save any changes since the buttons are disabled on the view. |
| Comments |
| Comment by Quach Hao Thien [ 06/Oct/22 ] |
|
Discovery: The reason RichTextEditor still can be input despite the whole field had being disabled is there is an attribute called contenteditable, which could be true/false, by setEnabled(false) to the field will not affect this attribute. The contenteditable are configurable via org.vaadin.alump.ckeditor.AbstractCKEditorTextField#setProtectedBody(boolean) method.
Proposed solution: When the Detail Subapp is opened on view/version viewType, the component container will be setEnabled(false) https://git.magnolia-cms.com/projects/PLATFORM/repos/ui/browse/magnolia-ui-framework/src/main/java/info/magnolia/ui/contentapp/detail/ContentDetailSubApp.java#159,161, Therefore, to set all its components disabled, we have to looping and setting manually
|