Skip to content

Commit

Permalink
Navigation: Try removing absorb toolbar prop. (#36990)
Browse files Browse the repository at this point in the history
* Navigation: Try removing absorb toolbar prop.

* Add capture toolbars to submenus.

* Update packages/block-library/src/navigation-submenu/edit.js

Co-authored-by: Dave Smith <[email protected]>
  • Loading branch information
2 people authored and noisysocks committed Dec 6, 2021
1 parent 4b22647 commit da5da04
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
6 changes: 6 additions & 0 deletions packages/block-library/src/navigation-submenu/edit.js
Original file line number Diff line number Diff line change
Expand Up @@ -508,6 +508,12 @@ export default function NavigationSubmenuEdit( {
allowedBlocks: ALLOWED_BLOCKS,
__experimentalDefaultBlock: DEFAULT_BLOCK,
__experimentalDirectInsert: true,

// Ensure block toolbar is not too far removed from item
// being edited.
// see: https://github.com/WordPress/gutenberg/pull/34615.
__experimentalCaptureToolbars: true,

renderAppender:
isSelected ||
( isImmediateParentOfSelectedBlock &&
Expand Down
5 changes: 0 additions & 5 deletions packages/block-library/src/navigation/edit/inner-blocks.js
Original file line number Diff line number Diff line change
Expand Up @@ -110,11 +110,6 @@ export default function NavigationInnerBlocks( {
__experimentalDirectInsert: shouldDirectInsert,
orientation,
renderAppender: CustomAppender || appender,

// Ensure block toolbar is not too far removed from item
// being edited when in vertical mode.
// see: https://github.com/WordPress/gutenberg/pull/34615.
__experimentalCaptureToolbars: orientation !== 'vertical',
// Template lock set to false here so that the Nav
// Block on the experimental menus screen does not
// inherit templateLock={ 'all' }.
Expand Down

0 comments on commit da5da04

Please sign in to comment.