Skip to content

Commit

Permalink
Writing Flow: Small enhancements (avoid return false and style change)
Browse files Browse the repository at this point in the history
  • Loading branch information
youknowriad committed Aug 29, 2017
1 parent 5279b9a commit 2d8584f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion blocks/url-input/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ class UrlInput extends Component {
// If the suggestions are not shown, we shouldn't handle the arrow keys
// We shouldn't preventDefault to allow block arrow keys navigation
if ( ! this.state.showSuggestions || ! this.state.posts.length ) {
return false;
return;
}

switch ( event.keyCode ) {
Expand Down
2 changes: 1 addition & 1 deletion editor/writing-flow/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ class WritingFlow extends Component {
'input',
].join( ', ' );
const isVisible = ( elem ) => elem.offsetWidth > 0 || elem.offsetHeight > 0 || elem.getClientRects().length > 0;
return Array.from( this.container.querySelectorAll( tabbablesSelector ) ).filter( isVisible );
return [ ...this.container.querySelectorAll( tabbablesSelector ) ].filter( isVisible );
}

moveFocusInContainer( target, direction = 'UP' ) {
Expand Down

0 comments on commit 2d8584f

Please sign in to comment.