Skip to content

Commit

Permalink
Revert "disable inserter depending on setting"
Browse files Browse the repository at this point in the history
This reverts commit e7dd896.
  • Loading branch information
jbinda committed Mar 19, 2020
1 parent e12e003 commit 01e35d6
Showing 1 changed file with 1 addition and 10 deletions.
11 changes: 1 addition & 10 deletions packages/block-editor/src/components/inserter/index.native.js
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,6 @@ export class Inserter extends Component {
renderToggle = defaultRenderToggle,
getStylesFromColorScheme,
showSeparator,
blockDoNotSupportInserter,
} = this.props;
if ( showSeparator && isOpen ) {
return <BlockInsertionPoint />;
Expand Down Expand Up @@ -193,7 +192,7 @@ export class Inserter extends Component {
{ renderToggle( {
onToggle: onPress,
isOpen,
disabled: disabled || blockDoNotSupportInserter,
disabled,
style,
onLongPress,
} ) }
Expand Down Expand Up @@ -257,11 +256,8 @@ export default compose( [
getBlockOrder,
getBlockIndex,
getBlock,
getBlockName,
} = select( 'core/block-editor' );

const { getBlockSupport } = select( 'core/blocks' );

const end = getBlockSelectionEnd();
// `end` argument (id) can refer to the component which is removed
// due to pressing `undo` button, that's why we need to check
Expand Down Expand Up @@ -319,18 +315,13 @@ export default compose( [
? selectedBlockIndex + 1
: endOfRootIndex;

const blockDoNotSupportInserter =
! isAppender &&
getBlockSupport( getBlockName( end ), 'inserter' ) === false;

return {
destinationRootClientId,
insertionIndexDefault: getDefaultInsertionIndex(),
insertionIndexBefore,
insertionIndexAfter,
isAnyBlockSelected,
isSelectedBlockReplaceable: isSelectedUnmodifiedDefaultBlock,
blockDoNotSupportInserter,
};
} ),

Expand Down

0 comments on commit 01e35d6

Please sign in to comment.