Skip to content

Commit

Permalink
Allow event for remove block to bubble from RichText when the shortcu…
Browse files Browse the repository at this point in the history
…t chord is pressed
  • Loading branch information
talldan committed Aug 13, 2018
1 parent bc4d22f commit 46ccb19
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion packages/editor/src/components/rich-text/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -397,8 +397,14 @@ export class RichText extends Component {
return;
}

const { keyCode } = event;
const { keyCode, altKey, metaKey } = event;
const isReverse = keyCode === BACKSPACE;

// User is using the Remove Block shortcut, so allow the event to bubble
if ( altKey && metaKey && isReverse ) {
return;
}

const { isCollapsed } = getSelection();

// Only process delete if the key press occurs at uncollapsed edge.
Expand Down

0 comments on commit 46ccb19

Please sign in to comment.