1
0
mirror of https://github.com/ianstormtaylor/slate.git synced 2025-08-26 00:27:28 +02:00

Make capitalizing work for iOS (#5654)

* Make capitalizing work for iOS

* Add changeset

---------

Co-authored-by: Alexey Starostin <astarostin@astarostin-pc.local>
This commit is contained in:
Alexey Starostin
2024-06-04 09:22:33 +06:00
committed by GitHub
parent 9ee604e17a
commit 2a8b4e958b
2 changed files with 7 additions and 2 deletions

View File

@@ -0,0 +1,5 @@
---
'slate-react': minor
---
Make capitalizing work for iOS

View File

@@ -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 (
<span {...attributes}>
{!IS_ANDROID || !isLineBreak ? '\uFEFF' : null}
{!(IS_ANDROID || IS_IOS) || !isLineBreak ? '\uFEFF' : null}
{isLineBreak ? <br /> : null}
</span>
)