Skip to content

Commit

Permalink
Have Aztec delete the detected Enter key for paragraphs
Browse files Browse the repository at this point in the history
Aztec-Android doesn't swallow the Enter key (like the list handling does) so,
instruct Aztec to delete it for the paragraph block.
  • Loading branch information
hypest committed Apr 30, 2019
1 parent 0936ca0 commit 1dddab4
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -731,6 +731,7 @@ export class RichText extends Component {
text={ { text: html, eventCount: this.lastEventCount, selection } }
placeholder={ this.props.placeholder }
placeholderTextColor={ this.props.placeholderTextColor || styles[ 'block-editor-rich-text' ].textDecorationColor }
deleteEnter={ this.props.deleteEnter }
onChange={ this.onChange }
onFocus={ this.onFocus }
onBlur={ this.onBlur }
Expand Down
1 change: 1 addition & 0 deletions packages/block-library/src/paragraph/edit.native.js
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,7 @@ class ParagraphEdit extends Component {
isSelected={ this.props.isSelected }
onFocus={ this.props.onFocus } // always assign onFocus as a props
onBlur={ this.props.onBlur } // always assign onBlur as a props
deleteEnter={ true }
style={ style }
onChange={ ( nextContent ) => {
setAttributes( {
Expand Down

0 comments on commit 1dddab4

Please sign in to comment.