diff --git a/packages/editor/src/components/rich-text/index.js b/packages/editor/src/components/rich-text/index.js index dda8813fa227d7..91e743c9a4b62e 100644 --- a/packages/editor/src/components/rich-text/index.js +++ b/packages/editor/src/components/rich-text/index.js @@ -23,7 +23,7 @@ import { getScrollContainer, } from '@wordpress/dom'; import { createBlobURL } from '@wordpress/blob'; -import { BACKSPACE, DELETE, ENTER, LEFT, RIGHT, rawShortcut } from '@wordpress/keycodes'; +import { BACKSPACE, DELETE, ENTER, LEFT, RIGHT, rawShortcut, isKeyboardEvent } from '@wordpress/keycodes'; import { Slot } from '@wordpress/components'; import { withSelect } from '@wordpress/data'; import { rawHandler, children } from '@wordpress/blocks'; @@ -397,11 +397,12 @@ export class RichText extends Component { return; } - const { keyCode, altKey, metaKey } = event; + const { keyCode } = event; const isReverse = keyCode === BACKSPACE; // User is using the Remove Block shortcut, so allow the event to bubble - if ( altKey && metaKey && isReverse ) { + // up to the BlockSettingsMenu component + if ( isKeyboardEvent.primaryAlt( event, 'Backspace' ) ) { return; }