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:
@@ -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(
|
||||
|
Reference in New Issue
Block a user