mirror of
https://github.com/ianstormtaylor/slate.git
synced 2025-08-13 18:53:59 +02:00
Revert to prev behavior on Android to fix caret (#5470)
* Revert to prev behavior on Android to fix caret * add changeset
This commit is contained in:
5
.changeset/ten-dryers-marry.md
Normal file
5
.changeset/ten-dryers-marry.md
Normal file
@@ -0,0 +1,5 @@
|
||||
---
|
||||
'slate-react': patch
|
||||
---
|
||||
|
||||
Fix Android caret placement regression when inputting into empty editor
|
@@ -366,7 +366,7 @@ export const Editable = (props: EditableProps) => {
|
||||
selection && ReactEditor.toDOMRange(editor, selection)
|
||||
|
||||
if (newDomRange) {
|
||||
if (ReactEditor.isComposing(editor)) {
|
||||
if (ReactEditor.isComposing(editor) && !IS_ANDROID) {
|
||||
domSelection.collapseToEnd()
|
||||
} else if (Range.isBackward(selection!)) {
|
||||
domSelection.setBaseAndExtent(
|
||||
|
Reference in New Issue
Block a user