-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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
select element doesn't work in paragraph #15933
Comments
Hi @joyously. What's the use-case for putting a select within a paragraph block? Curiously this works in Chrome, but not in Firefox. And I thought browser inconsistencies were a thing of the past! Anyway, most blocks aren't intended to support arbitrary markup, with many it'll cause a block validation error. For example if you try putting two The Custom HTML block was created for this purpose, and as mentioned the markup works fine there. As such, I'm going to close the issue and mark as Won't Fix, but by all means the conversation can continue, and if it turns out there is something to fix the issue can be reopened. |
My use case was to test my theme styles. I didn't see any other way to enter a Regardless of whether a |
I was just thinking that if I was writing a blog on HTML tutorials, I would want to be able to use the elements in my prose to show live examples. Why would any inline element be a problem for any block element? |
Yep, that's an interesting use case that doesn't seem well supported at the moment. The Custom HTML block does seem to be the best option, so it's a shame that it doesn't support styles properly. #9129 seems to be the issue covering it.
The issue is that blocks perform validation on their markup to check if the block's HTML is as expected: Editing the HTML can cause this validation to fail. In the worst case the block's attributes won't be properly parsable if the content has changed radically. I found a few issues that are related:
I suppose the core of the issue is that you want to be able to insert inline custom HTML while maintaining a good writing experience. In a block that's properly intended to support that experience, the
I just checked my comment above and I can't see where I said that this wasn't the case 😄. |
A
<select>
element in a paragraph block looks correct, but does not show the<option>
values.I checked the
pointer-events
CSS property and it was set to auto.I tested this on GB 5.8.0, using Twenty Nineteen.
To reproduce
Steps to reproduce the behavior:
<select>
and<option>
s elements.select
drops down to show theoption
s.select
does not drop down to show theoption
s.Expected behavior
The
select
in both blocks should show theoption
values the same way.Screenshots
Desktop
The text was updated successfully, but these errors were encountered: