Skip to content

Commit

Permalink
fix: allow input into editable voids (#5223)
Browse files Browse the repository at this point in the history
  • Loading branch information
alex-vladut authored Dec 14, 2022
1 parent a4cc213 commit 120437d
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .changeset/clean-socks-hammer.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'slate-react': patch
---

Fix issue preventing editing and copy/paste into editable voids
2 changes: 1 addition & 1 deletion packages/slate-react/src/components/editable.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -1311,7 +1311,7 @@ export const Editable = (props: EditableProps) => {
if (
!readOnly &&
!state.isUpdatingSelection &&
ReactEditor.hasSelectableTarget(editor, event.target) &&
ReactEditor.hasEditableTarget(editor, event.target) &&
!isEventHandled(event, attributes.onFocus)
) {
const el = ReactEditor.toDOMNode(editor, editor)
Expand Down

0 comments on commit 120437d

Please sign in to comment.