Skip to content
This repository has been archived by the owner on Jun 26, 2020. It is now read-only.

Commit

Permalink
Revert "Feature: Enter with Shift will not break the quota"
Browse files Browse the repository at this point in the history
This reverts commit 3a74581.
  • Loading branch information
ocavue authored and ocavue committed May 3, 2018
1 parent 3a74581 commit 84096ad
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions src/blockquoteediting.js
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,7 @@ export default class BlockQuoteEditing extends Plugin {
const command = editor.commands.get( 'blockQuote' );

// Overwrite default Enter key behavior.
// If Enter key is pressed with selection collapsed in empty block inside a quote, break the quote,
// unless the Shift key is pressed.
// If Enter key is pressed with selection collapsed in empty block inside a quote, break the quote.
// This listener is added in afterInit in order to register it after list's feature listener.
// We can't use a priority for this, because 'low' is already used by the enter feature, unless
// we'd use numeric priority in this case.
Expand All @@ -60,9 +59,6 @@ export default class BlockQuoteEditing extends Plugin {
const positionParent = doc.selection.getLastPosition().parent;

if ( doc.selection.isCollapsed && positionParent.isEmpty && command.value ) {
if ( data.domEvent && data.domEvent.shiftKey ) {
return;
}
this.editor.execute( 'blockQuote' );
this.editor.editing.view.scrollToTheSelection();

Expand Down

0 comments on commit 84096ad

Please sign in to comment.