Skip to content
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

Block restricted to a parent block shouldn't be able to be moved outside their parent block #11674

Closed
dianeco opened this issue Nov 9, 2018 · 3 comments
Labels
[Feature] Nested / Inner Blocks Anything related to the experience of nested/inner blocks inside a larger container, like Group or P [Type] Bug An existing feature does not function as intended

Comments

@dianeco
Copy link

dianeco commented Nov 9, 2018

Describe the bug
I’ve created a FAQ block which serves as a container for inner Faq Item blocks which are restricted to the FAQ block using the parent setting. Currently it’s possible to drag and drop the inner Faq Item blocks outside their parent block.

Parent FAQ block:

<div className={ classes }>
  <InnerBlocks 
	allowedBlocks={ [ gb/faq-item' ] } template={ [ [ 'gb/faq-item', {} ] ] }
 />
</div>

Child FAQ Item block:

registerBlockType( 'gb/faq-item', {
	title: __( 'FAQ item' ),
	parent: [ 'gb/faq' ],
});

Expected behavior
It shouldn't be possible to move a block restricted to a parent block outside its parent.

@chrisvanpatten
Copy link
Contributor

I'm about 90% sure there's another open ticket for this but for some reason I can't find it 😂 That said I totally agree this is a problem and should be fixed up!

@chrisvanpatten chrisvanpatten added [Type] Bug An existing feature does not function as intended [Feature] Nested / Inner Blocks Anything related to the experience of nested/inner blocks inside a larger container, like Group or P labels Nov 9, 2018
@mtias
Copy link
Member

mtias commented Nov 21, 2018

Duplicate of #11131.

@mtias mtias closed this as completed Nov 21, 2018
@chrisvanpatten
Copy link
Contributor

Aaaand @mtias in with the assist 😂

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Feature] Nested / Inner Blocks Anything related to the experience of nested/inner blocks inside a larger container, like Group or P [Type] Bug An existing feature does not function as intended
Projects
None yet
Development

No branches or pull requests

3 participants