From 165ac3c695b64101aab87eaf478dc3e40330ecc2 Mon Sep 17 00:00:00 2001 From: Jack Hanford Date: Wed, 31 Mar 2021 15:05:33 -0700 Subject: [PATCH] disable spellCheck, autoCorrect, autoCapitalize when browser doesnt HAS_BEFORE_INPUT_SUPPORT (#3946) --- packages/slate-react/src/components/editable.tsx | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/packages/slate-react/src/components/editable.tsx b/packages/slate-react/src/components/editable.tsx index 0dc85955e..af95b9e6d 100644 --- a/packages/slate-react/src/components/editable.tsx +++ b/packages/slate-react/src/components/editable.tsx @@ -505,14 +505,10 @@ export const Editable = (props: EditableProps) => { {...attributes} // COMPAT: Certain browsers don't support the `beforeinput` event, so we'd // have to use hacks to make these replacement-based features work. - spellCheck={ - !HAS_BEFORE_INPUT_SUPPORT ? undefined : attributes.spellCheck - } - autoCorrect={ - !HAS_BEFORE_INPUT_SUPPORT ? undefined : attributes.autoCorrect - } + spellCheck={!HAS_BEFORE_INPUT_SUPPORT ? false : attributes.spellCheck} + autoCorrect={!HAS_BEFORE_INPUT_SUPPORT ? false : attributes.autoCorrect} autoCapitalize={ - !HAS_BEFORE_INPUT_SUPPORT ? undefined : attributes.autoCapitalize + !HAS_BEFORE_INPUT_SUPPORT ? false : attributes.autoCapitalize } data-slate-editor data-slate-node="value"