mirror of
https://github.com/ianstormtaylor/slate.git
synced 2025-08-26 08:34: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:
5
.changeset/stale-bats-jog.md
Normal file
5
.changeset/stale-bats-jog.md
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
---
|
||||||
|
'slate-react': minor
|
||||||
|
---
|
||||||
|
|
||||||
|
Make capitalizing work for iOS
|
@@ -3,7 +3,7 @@ import { Editor, Text, Path, Element, Node } from 'slate'
|
|||||||
|
|
||||||
import { ReactEditor, useSlateStatic } from '..'
|
import { ReactEditor, useSlateStatic } from '..'
|
||||||
import { useIsomorphicLayoutEffect } from '../hooks/use-isomorphic-layout-effect'
|
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'
|
import { MARK_PLACEHOLDER_SYMBOL } from '../utils/weak-maps'
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -129,7 +129,7 @@ export const ZeroWidthString = (props: {
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<span {...attributes}>
|
<span {...attributes}>
|
||||||
{!IS_ANDROID || !isLineBreak ? '\uFEFF' : null}
|
{!(IS_ANDROID || IS_IOS) || !isLineBreak ? '\uFEFF' : null}
|
||||||
{isLineBreak ? <br /> : null}
|
{isLineBreak ? <br /> : null}
|
||||||
</span>
|
</span>
|
||||||
)
|
)
|
||||||
|
Reference in New Issue
Block a user