Skip to content

Commit

Permalink
Call keyDown handler while composing (#4923)
Browse files Browse the repository at this point in the history
  • Loading branch information
BitPhinix committed Apr 3, 2022
1 parent 7de7cdc commit 08d5a12
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
5 changes: 5 additions & 0 deletions .changeset/big-keys-grab.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'slate-react': patch
---

Call keyDown handler while composing
4 changes: 2 additions & 2 deletions packages/slate-react/src/components/editable.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -1064,9 +1064,9 @@ export const Editable = (props: EditableProps) => {
(event: React.KeyboardEvent<HTMLDivElement>) => {
if (
!readOnly &&
!state.isComposing &&
hasEditableTarget(editor, event.target) &&
!isEventHandled(event, attributes.onKeyDown)
!isEventHandled(event, attributes.onKeyDown) &&
!state.isComposing
) {
const { nativeEvent } = event
const { selection } = editor
Expand Down

0 comments on commit 08d5a12

Please sign in to comment.