Skip to content

Commit

Permalink
Allow invalid block focus for movement / deletion
Browse files Browse the repository at this point in the history
  • Loading branch information
aduth committed Jul 26, 2017
1 parent 74be312 commit feb105e
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions editor/modes/visual-editor/block.js
Original file line number Diff line number Diff line change
Expand Up @@ -325,7 +325,7 @@ class VisualEditorBlock extends Component {

// Generate the wrapper class names handling the different states of the block.
const { isHovered, isSelected, isMultiSelected, isFirstMultiSelected, focus } = this.props;
const showUI = isValid && isSelected && ( ! this.props.isTyping || focus.collapsed === false );
const showUI = isSelected && ( ! this.props.isTyping || focus.collapsed === false );
const { showMobileControls } = this.state;
const wrapperClassname = classnames( 'editor-visual-editor__block', {
'is-invalid': ! isValid,
Expand Down Expand Up @@ -360,13 +360,13 @@ class VisualEditorBlock extends Component {
onMouseLeave={ onMouseLeave }
className={ wrapperClassname }
data-type={ block.name }
tabIndex={ isValid ? 0 : -1 }
tabIndex="0"
aria-label={ blockLabel }
{ ...wrapperProps }
>
{ ( showUI || isHovered ) && <BlockMover uids={ [ block.uid ] } /> }
{ ( showUI || isHovered ) && <BlockRightMenu uid={ block.uid } /> }
{ showUI &&
{ showUI && isValid &&
<CSSTransitionGroup
transitionName={ { appear: 'is-appearing', appearActive: 'is-appearing-active' } }
transitionAppear={ true }
Expand Down

0 comments on commit feb105e

Please sign in to comment.