1
0
mirror of https://github.com/ianstormtaylor/slate.git synced 2025-08-11 09:43:58 +02:00

Fix Android cursor jumping to word start after autocorrect (#5901)

* Enhance Android input manager to store current selection before applying diffs and ensure correct selection position post-update.

* Add autocorrect test case to Android input examples

This update introduces a new test case for autocorrect functionality in both JavaScript and TypeScript examples. The test case instructs users to type "Cant" and verify the cursor position after autocorrection.

* Add changeset

* Remove unnecessary comments

* Drop pending selection change on programatic text insert
This commit is contained in:
Bartosz Legięć
2025-06-26 20:49:17 +02:00
committed by GitHub
parent aa27c2dfaf
commit 5a20ea3ad8
5 changed files with 63 additions and 2 deletions

View File

@@ -173,6 +173,18 @@ const TEST_CASES = [
},
],
},
{
id: 'autocorrect',
name: 'Autocorrect',
instructions:
'Type "Cant", then press space to autocorrect it. Make sure the cursor position is correct (after the autocorrected word)',
value: [
{
type: 'paragraph',
children: [{ text: '' }],
},
],
},
]
const AndroidTestsExample = () => {
const [testId, setTestId] = useState(