Skip to content

Commit

Permalink
Merge pull request #811 from WordPress/fix/button-focus
Browse files Browse the repository at this point in the history
Button Block: fix focus and customize toolbar items.
  • Loading branch information
mtias committed May 16, 2017
2 parents 5fc0ddf + 8c7085c commit 2ec8cc6
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions blocks/library/button/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -76,9 +76,12 @@ registerBlock( 'core/button', {
tagName="span"
placeholder={ wp.i18n.__( 'Write label…' ) }
value={ text }
focus={ focus }
onFocus={ setFocus }
onChange={ ( value ) => setAttributes( { text: value } ) }
inline
inlineToolbar
formattingControls={ [ 'bold', 'italic', 'strikethrough' ] }
/>
{ focus &&
<form
Expand Down

0 comments on commit 2ec8cc6

Please sign in to comment.