Skip to content

Commit

Permalink
Code Block: Use value instead of defaultValue on textarea (#866)
Browse files Browse the repository at this point in the history
  • Loading branch information
ellatrix authored May 22, 2017
1 parent 258e44a commit 3f2be75
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion blocks/library/code/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ registerBlock( 'core/code', {
edit( { attributes, setAttributes, setFocus } ) {
return (
<TextareaAutosize
defaultValue={ attributes.content }
value={ attributes.content }
onFocus={ setFocus }
onChange={ ( event ) => setAttributes( { content: event.target.value } ) }
/>
Expand Down

0 comments on commit 3f2be75

Please sign in to comment.