Skip to content

Commit

Permalink
Editable: document the shift+enter splitting behaviour
Browse files Browse the repository at this point in the history
  • Loading branch information
youknowriad committed Jun 20, 2017
1 parent 859dba0 commit fed0607
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions blocks/editable/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -207,6 +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 ( event.keyCode === ENTER && event.shiftKey && this.props.inline ) {
event.preventDefault();

Expand Down

0 comments on commit fed0607

Please sign in to comment.