1
0
mirror of https://github.com/ianstormtaylor/slate.git synced 2025-08-26 08:34:28 +02:00

fix: allow input into editable voids (#5223)

This commit is contained in:
alex-vladut
2022-12-14 18:36:32 +02:00
committed by GitHub
parent a4cc213087
commit 120437d612
2 changed files with 6 additions and 1 deletions

View File

@@ -0,0 +1,5 @@
---
'slate-react': patch
---
Fix issue preventing editing and copy/paste into editable voids

View File

@@ -1311,7 +1311,7 @@ export const Editable = (props: EditableProps) => {
if ( if (
!readOnly && !readOnly &&
!state.isUpdatingSelection && !state.isUpdatingSelection &&
ReactEditor.hasSelectableTarget(editor, event.target) && ReactEditor.hasEditableTarget(editor, event.target) &&
!isEventHandled(event, attributes.onFocus) !isEventHandled(event, attributes.onFocus)
) { ) {
const el = ReactEditor.toDOMNode(editor, editor) const el = ReactEditor.toDOMNode(editor, editor)