Skip to content

Commit

Permalink
Blocks: Unselect the first block properly
Browse files Browse the repository at this point in the history
 - The disalbed state caused a focus jump. Big props to @aduth
  • Loading branch information
youknowriad committed May 12, 2017
1 parent 0006673 commit 6b7b163
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
4 changes: 2 additions & 2 deletions editor/block-mover/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,13 @@ function BlockMover( { onMoveUp, onMoveDown, isFirst, isLast } ) {
className="editor-block-mover__control"
onClick={ onMoveUp }
icon="arrow-up-alt2"
disabled={ isFirst }
aria-disabled={ isFirst }
/>
<IconButton
className="editor-block-mover__control"
onClick={ onMoveDown }
icon="arrow-down-alt2"
disabled={ isLast }
aria-disabled={ isLast }
/>
</div>
);
Expand Down
3 changes: 2 additions & 1 deletion editor/block-mover/style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,10 @@
color: $dark-gray-900;
}

&[disabled] {
&[aria-disabled="true"] {
cursor: default;
color: $light-gray-300;
pointer-events: none;
}

.dashicon {
Expand Down

0 comments on commit 6b7b163

Please sign in to comment.