From 3dd9ab1099127a8ed7fe122ba854514f142c1d87 Mon Sep 17 00:00:00 2001 From: Ella van Durpe Date: Thu, 21 Nov 2019 22:17:43 +0100 Subject: [PATCH] Disable selection change when contenteditable=false --- packages/rich-text/src/component/index.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/packages/rich-text/src/component/index.js b/packages/rich-text/src/component/index.js index a695ad8f0100c..248fdb1d0c0dd 100644 --- a/packages/rich-text/src/component/index.js +++ b/packages/rich-text/src/component/index.js @@ -491,6 +491,10 @@ class RichText extends Component { return; } + if ( this.props.__unstableContentEditable === false ) { + return; + } + // In case of a keyboard event, ignore selection changes during // composition. if (