1
0
mirror of https://github.com/ianstormtaylor/slate.git synced 2025-08-10 17:24:02 +02:00

Call keyDown handler while composing (#4923)

This commit is contained in:
Eric Meier
2022-04-03 16:44:46 +01:00
committed by GitHub
parent 7de7cdcf56
commit 08d5a12c91
2 changed files with 7 additions and 2 deletions

View File

@@ -0,0 +1,5 @@
---
'slate-react': patch
---
Call keyDown handler while composing

View File

@@ -1064,9 +1064,9 @@ export const Editable = (props: EditableProps) => {
(event: React.KeyboardEvent<HTMLDivElement>) => { (event: React.KeyboardEvent<HTMLDivElement>) => {
if ( if (
!readOnly && !readOnly &&
!state.isComposing &&
hasEditableTarget(editor, event.target) && hasEditableTarget(editor, event.target) &&
!isEventHandled(event, attributes.onKeyDown) !isEventHandled(event, attributes.onKeyDown) &&
!state.isComposing
) { ) {
const { nativeEvent } = event const { nativeEvent } = event
const { selection } = editor const { selection } = editor