-
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
"Insert Before/After" settings menu buttons insert paragraphs inside InnerBlocks even if parent block disallows paragraph #10301
Comments
@barryceelen #10136 (and its parent issue #8589) is working on an alternate "default" block option that would be available in contexts that don't support There's also some extra context at #6569. To keep things contained I'll close this up but definitely recommend watching/commenting over at #8589 and #10136! Thanks for the report :) |
Thanks for providing context @chrisvanpatten |
@chrisvanpatten #10136 #8589 #6569 were merged and/or closed but did not address the issue mentioned here. Can we reopen this issue? |
@barryceelen are you running from |
@chrisvanpatten I am running the development version from master. Unless I'm super missing something, the issue with "Insert Before" and "Insert After" via the block settings menu that this particular ticket is about is not addressed/fixed via #10136, hence my request to reopen this ticket 💌. |
@barryceelen can you provide a code gist with a block that is set up this way we can drop in for testing? |
Will reopen for now while we wait for a test case 👍 |
Thanks @adamsilverstein & @chrisvanpatten. I've created a block that accepts the https://gist.github.com/barryceelen/ee76376702c91c954d21973de396adc1 |
Related #10752 I can reproduce this on my custom block which is complex (sharable but I doubt you'd want to install it) but ABSOLUTELY does the same thing @barryceelen is seeing. Insert Before/After defaults to paragraph no matter what you put in. And yes, I tested on 4.0 |
More reports of this with #10752 and #10726 which I've consolidated here! @Ipstenu also had a great GIF in #10752 that's worth checking. @barryceelen I'm going to rename your title to make it a little broader as the solution could be removing those menu options, or adding a block with the alternate appender introduced in #10136, or something else entirely! |
Uploading Gif here too so folks can see it. The code I use is in https://github.com/LezWatch/lezwatch-library/tree/master/gutenberg/src/listicle which ... I am aware it's not optimal code. |
I think this might have been fixed recently, right @jorgefilipecosta? |
Hi @youknowriad, yes, this issue was fixed recently. I'm closing the issue, thank you all for reporting it and providing additional information. 👍 |
The block settings menu for a nested block allows inserting a Paragraph block even if the parent block does not allow the Paragraph block as a child.
Steps to reproduce the behavior:
<InnerBlocks />
and disallow the Paragraph block as a childExpected behavior
The "Insert Before" and "Insert After" options should not be visible if the Paragraph block is not allowed as a child block.
Alternatively, an
<Innerblocks />
block should be able to override the global default block, or if it only accepts one block type, that block should be used by the "Insert Before" and "Insert After" options.Screenshots
The text was updated successfully, but these errors were encountered: