From 12d21eac2dc3c527547f18d88f9dcd65bd401e95 Mon Sep 17 00:00:00 2001 From: Jokcy Date: Tue, 3 Dec 2019 14:49:23 +0800 Subject: [PATCH] onCompositionEnd not need to insert text in firfox (#3202) --- packages/slate-react/src/components/editable.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/slate-react/src/components/editable.tsx b/packages/slate-react/src/components/editable.tsx index 1a8a2cc4f..60caa7745 100644 --- a/packages/slate-react/src/components/editable.tsx +++ b/packages/slate-react/src/components/editable.tsx @@ -534,7 +534,7 @@ export const Editable = ( // aren't correct and never fire the "insertFromComposition" // type that we need. So instead, insert whenever a composition // ends since it will already have been committed to the DOM. - if (!IS_SAFARI && event.data) { + if (!IS_SAFARI && !IS_FIREFOX && event.data) { editor.exec({ type: 'insert_text', text: event.data }) } }