Skip to content

Commit

Permalink
Only capture toolbars on parent Nav block when not in vertical mode (#…
Browse files Browse the repository at this point in the history
…34615)

* Only capture toolbars on parent Nav block when not in vertical mode

* Add code comment for context and clarity about reason for change
  • Loading branch information
getdave authored Sep 8, 2021
1 parent 83af4c0 commit fea6b6b
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion packages/block-library/src/navigation/edit.js
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,11 @@ function Navigation( {
isSelected
? InnerBlocks.DefaultAppender
: false,
__experimentalCaptureToolbars: true,
// 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:
attributes.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 fea6b6b

Please sign in to comment.