-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
Misleading More text after saving an empty text #23780
Comments
As a user, what did you expect to happen in the editor once you emptied the text input? And in the front end? |
The More block was added fairly early on in the development of Gutenberg and it sought to mimic the functionality provided with TinyMCE. This explains why it's such a simple block and why its editor view is so detached from the front-end result. It's also a block that doesn't tend to receive a lot of attention, and so it has remained like this for a long time. More importantly, until Phase 2, Gutenberg has only concerned itself with the However, as we move into full-site editing (FSE) territory, it will probably be good to revisit More in such a way that it can behave differently depending on the editing content:
Ideally, the FSE work with More in mind would make it easier to determine what the server-side |
Probably be empty both at admin and front-end. |
I'm closing this issue as it seems FSE development/evolution is a better place to revisit, maybe reinvent, as described by @mcsf above. |
Describe the bug
With the current behaviour of
More
block, if we change the text to an empty string and update, we will save anundefined
value. This leads into taking the default value ofMore
block that isContinue Reading
.So if we refresh the page later will show the JS default value:
Read more
but actually doesn't have a value.To reproduce
Steps to reproduce the behavior:
More
blockMore
text and updateRead more
is shownContinue Reading
is shownExpected behavior
A user shouldn't be able to save an empty text for
More
block. On focusing out the input, it should change to the default JS valueRead more
.Screenshots
When we save.
After reloading the post
What is shown in front-end
The text was updated successfully, but these errors were encountered: