Skip to content

Commit

Permalink
fix #22550 and allow enter to insert line breaks in richtext
Browse files Browse the repository at this point in the history
  • Loading branch information
oxyc committed Jul 2, 2020
1 parent d41c9d4 commit a340ca4
Showing 1 changed file with 1 addition and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,6 @@ const BlockComponent = forwardRef(
enableAnimation,
index,
className,
isLocked,
name,
mode,
blockTitle,
Expand Down Expand Up @@ -249,8 +248,7 @@ const BlockComponent = forwardRef(
data-block={ clientId }
data-type={ name }
data-title={ blockTitle }
// Only allow shortcuts when a blocks is selected and not locked.
onKeyDown={ isSelected && ! isLocked ? onKeyDown : undefined }
onKeyDown={ onKeyDown }
// Only allow selection to be started from a selected block.
onMouseLeave={ isSelected ? onMouseLeave : undefined }
// No need to have these listeners for hover class in edit mode.
Expand Down

0 comments on commit a340ca4

Please sign in to comment.