Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/shaggy-points-suffer.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'slate-react': patch
---

Fix IME composition being ignored in the first character in a line
Original file line number Diff line number Diff line change
Expand Up @@ -688,6 +688,15 @@ export function createAndroidInputManager({
insertPositionHint = false
}

if (
type === 'insertCompositionText' ||
type === 'deleteCompositionText'
) {
storeDiff(start.path, diff)
// Don't schedule selection updates during composition
return
}

if (canStoreDiff) {
const currentSelection = editor.selection
storeDiff(start.path, diff)
Expand Down Expand Up @@ -761,7 +770,7 @@ export function createAndroidInputManager({
insertPositionHint = false
}

if (pathChanged || hasPendingDiffs()) {
if ((pathChanged || hasPendingDiffs()) && !IS_COMPOSING.get(editor)) {
flushTimeoutId = setTimeout(flush, FLUSH_DELAY)
}
}
Expand Down
Loading