-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
Hotfix: unnecessary Discard Changes dialog for RTEs #17692
Merged
iOvergaard
merged 10 commits into
release/15.1
from
15.1/hotfix/unnecessary-rte-value-changes
Dec 2, 2024
Merged
Hotfix: unnecessary Discard Changes dialog for RTEs #17692
iOvergaard
merged 10 commits into
release/15.1
from
15.1/hotfix/unnecessary-rte-value-changes
Dec 2, 2024
Conversation
This file contains 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
madsrasmussen
changed the title
Hotfix: unnecessary RTE value changes
Hotfix: unnecessary Discard Changes dialog for RTEs
Dec 2, 2024
iOvergaard
approved these changes
Dec 2, 2024
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tested it out and looks like it is working.
This was referenced Dec 5, 2024
Hi, I realize it also happens on Content pages that have BlockList/BlockGrid inside, is this PR fixed that issue also? @madsrasmussen |
I got the same issue @NguyenThuyLan and created a new issue for it: #17784 |
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: