-
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
keepPlaceholderOnFocus for Paragraph and Heading when used in a Template #13151
Comments
|
Closing as stale. Let's reopen if we can make it actionable. |
Sorry for the late answer. Following code example:
Keeping the placeholder when focus on "core/heading" isn't working, when using in this combination. Focus is just removing the placeholder, without entering something. Same for core/paragraph. |
@floriandagge Where is this code example coming from. |
@youknowriad oh, I'm sorry, I don't know where it was coming from initially. I just double-checked the source, and I'm not sure why I didn't recognize that the whole attribute is not existing in the two blocks. Sorry for that! However, as you can see, it would be very good to implement this attribute. Do you think this can be added? |
The problem is it's a design decision and attributes are meant to be used for things that persist that are meaningful for the content. I feel like adding this would be too much complexity for a small gain. An alternative would be to build an alternative block but I can see how this is also too much for such a small change. |
Use Case
I created a custom block for Gutenberg which makes use of "InnerBlock".
I also added a template in the same step, including some options like "placeholder".
The option "placeholder" itself works fine, but "keepPlaceholderOnFocus" doesn't seem to work in this scenario, as placeholder is removed when focusing the element.
Possible solution
It should be possible to use the option "keepPlaceholderOnFocus" in scenarios like this.
The text was updated successfully, but these errors were encountered: