Hotfix: unnecessary Discard Changes dialog for RTEs#17692
Merged
iOvergaard merged 10 commits intorelease/15.1from Dec 2, 2024
Merged
Hotfix: unnecessary Discard Changes dialog for RTEs#17692iOvergaard merged 10 commits intorelease/15.1from
iOvergaard merged 10 commits intorelease/15.1from
Conversation
iOvergaard
approved these changes
Dec 2, 2024
Contributor
iOvergaard
left a comment
There was a problem hiding this comment.
Tested it out and looks like it is working.
This was referenced Dec 5, 2024
Contributor
|
Hi, I realize it also happens on Content pages that have BlockList/BlockGrid inside, is this PR fixed that issue also? @madsrasmussen |
Contributor
|
I got the same issue @NguyenThuyLan and created a new issue for it: #17784 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes: #17670
The PR aims to clean up how we set/update the RTE property value so we don't get the "Discard Changes" dialog unless there has been user updates to the value.
How I went about this:
Allow the internal property _value to be undefined.
The property value can be undefined but the internal _value could only be the full value object with blocks. By aligning these it is easier to keep them in sync. The new code clears all internal the values and only sets the block data if we get a markup value.
Handles the Tip Tap empty
and returns the value you would expect. I have added a public method on our element to proxy their value.<p></p>tag (ueberdosis/tiptap#154)This issue wasn't directly linked to this issue but for us to be able to check for an empty tip tap editor I encountered this issue. Tip Tap has a property on their element to check if it's empty. It ignores the
What to test: