From 17ef62d5f237f05bfe576f6cf9759a2a217595b3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ella=20van=C2=A0Durpe?= Date: Fri, 24 Jan 2020 04:00:47 +0100 Subject: [PATCH] Rich text: enable if multi selection is aborted (#19839) --- .../src/components/block-list/use-multi-selection.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/packages/block-editor/src/components/block-list/use-multi-selection.js b/packages/block-editor/src/components/block-list/use-multi-selection.js index 1712970e7cbac..a0ba7de65a0f0 100644 --- a/packages/block-editor/src/components/block-list/use-multi-selection.js +++ b/packages/block-editor/src/components/block-list/use-multi-selection.js @@ -150,8 +150,10 @@ export default function useMultiSelection( ref ) { const onSelectionChange = useCallback( ( { isSelectionEnd } ) => { const selection = window.getSelection(); - // If no selection is found, end multi selection. + // If no selection is found, end multi selection and enable all rich + // text areas. if ( ! selection.rangeCount || selection.isCollapsed ) { + toggleRichText( ref.current, true ); return; }