diff --git a/.changeset/stale-bats-jog.md b/.changeset/stale-bats-jog.md new file mode 100644 index 0000000000..a75db360fd --- /dev/null +++ b/.changeset/stale-bats-jog.md @@ -0,0 +1,5 @@ +--- +'slate-react': minor +--- + +Make capitalizing work for iOS diff --git a/packages/slate-react/src/components/string.tsx b/packages/slate-react/src/components/string.tsx index 295acf2fd2..3b87013315 100644 --- a/packages/slate-react/src/components/string.tsx +++ b/packages/slate-react/src/components/string.tsx @@ -3,7 +3,7 @@ import { Editor, Text, Path, Element, Node } from 'slate' import { ReactEditor, useSlateStatic } from '..' import { useIsomorphicLayoutEffect } from '../hooks/use-isomorphic-layout-effect' -import { IS_ANDROID } from '../utils/environment' +import { IS_ANDROID, IS_IOS } from '../utils/environment' import { MARK_PLACEHOLDER_SYMBOL } from '../utils/weak-maps' /** @@ -129,7 +129,7 @@ export const ZeroWidthString = (props: { return ( - {!IS_ANDROID || !isLineBreak ? '\uFEFF' : null} + {!(IS_ANDROID || IS_IOS) || !isLineBreak ? '\uFEFF' : null} {isLineBreak ?
: null}
)