1
0
mirror of https://github.com/ianstormtaylor/slate.git synced 2025-08-11 17:53:59 +02:00

disable spellCheck, autoCorrect, autoCapitalize when browser doesnt HAS_BEFORE_INPUT_SUPPORT (#3946)

This commit is contained in:
Jack Hanford
2021-03-31 15:05:33 -07:00
committed by GitHub
parent 2db9a36f93
commit 165ac3c695

View File

@@ -505,14 +505,10 @@ export const Editable = (props: EditableProps) => {
{...attributes} {...attributes}
// COMPAT: Certain browsers don't support the `beforeinput` event, so we'd // COMPAT: Certain browsers don't support the `beforeinput` event, so we'd
// have to use hacks to make these replacement-based features work. // have to use hacks to make these replacement-based features work.
spellCheck={ spellCheck={!HAS_BEFORE_INPUT_SUPPORT ? false : attributes.spellCheck}
!HAS_BEFORE_INPUT_SUPPORT ? undefined : attributes.spellCheck autoCorrect={!HAS_BEFORE_INPUT_SUPPORT ? false : attributes.autoCorrect}
}
autoCorrect={
!HAS_BEFORE_INPUT_SUPPORT ? undefined : attributes.autoCorrect
}
autoCapitalize={ autoCapitalize={
!HAS_BEFORE_INPUT_SUPPORT ? undefined : attributes.autoCapitalize !HAS_BEFORE_INPUT_SUPPORT ? false : attributes.autoCapitalize
} }
data-slate-editor data-slate-editor
data-slate-node="value" data-slate-node="value"