Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[#2678] Fix "Reveal" button in secret blocks in multi-editor #4985

Open
wants to merge 1 commit into
base: 4.2.x
Choose a base branch
from

Conversation

arbron
Copy link
Collaborator

@arbron arbron commented Jan 11, 2025

Fixes the issues with reveal buttons for secret blocks for items and actors that use multiple description editors. This required overriding _getSecretContent and _updateSecret to look for data-target in addition to data-edit. The locking code was also modified to avoid disabling the secret button when the sheets are in play mode.

There is a still a bug with the PC sheet and the item sheets with only a single description (like classes), which don't retain the secret state if the play/edit toggle is changed immediately after changing the secret state. This appears to be because when it submits FormDataExtended is fetching old data from the editor instances on the sheet.

Closes #2678

@arbron arbron added the bug Functionality which is not working as intended label Jan 11, 2025
@arbron arbron added this to the D&D5E 4.2.0 milestone Jan 11, 2025
@arbron arbron requested a review from Fyorl January 11, 2025 01:13
@arbron arbron self-assigned this Jan 11, 2025
@arbron arbron modified the milestones: D&D5E 4.2.0, D&D5E 4.3.0 Jan 20, 2025
Fixes the issues with reveal buttons for secret blocks for items
and actors that use multiple description editors. This required
overriding `_getSecretContent` and `_updateSecret` to look for
`data-target` in addition to `data-edit`. The locking code was
also modified to avoid disabling the secret button when the sheets
are in play mode.

There is a still a bug with the PC sheet and the item sheets with
only a single description (like classes), which don't retain the
secret state if the play/edit toggle is changed immediately after
changing the secret state. This appears to be because when it
submits `FormDataExtended` is fetching old data from the editor
instances on the sheet.

Closes #2678
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Functionality which is not working as intended
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Secret block "Reveal" button is non-functional in MultiEditor
1 participant