Skip to content

Commit

Permalink
Editable: Better comment wording to explain the shift+enter splitting
Browse files Browse the repository at this point in the history
  • Loading branch information
youknowriad committed Jun 20, 2017
1 parent 0262682 commit 8fd70f4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions blocks/editable/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -207,8 +207,8 @@ export default class Editable extends wp.element.Component {
event.stopImmediatePropagation();
}

// If we click shift+Enter on inline Editables, we should avoid creating `p` tags
// We should also split the content if splitting is allowed.
// If we click shift+Enter on inline Editables, we avoid creating two contenteditables
// We also split the content and call the onSplit prop if provided.
if ( event.keyCode === ENTER && event.shiftKey && this.props.inline ) {
event.preventDefault();

Expand Down

0 comments on commit 8fd70f4

Please sign in to comment.