mirror of
https://github.com/ianstormtaylor/slate.git
synced 2025-04-21 13:51:59 +02:00
Fix crash on drag and drop image on readOnly editable (#4617)
* Fix crash on drag and drop image on readOnly editable * add changeset
This commit is contained in:
parent
67badb7dd0
commit
b186d3ea12
5
.changeset/stale-years-sip.md
Normal file
5
.changeset/stale-years-sip.md
Normal file
@ -0,0 +1,5 @@
|
||||
---
|
||||
'slate-react': patch
|
||||
---
|
||||
|
||||
Fix crash on drag and drop image on readOnly editable
|
@ -884,6 +884,7 @@ export const Editable = (props: EditableProps) => {
|
||||
onDragStart={useCallback(
|
||||
(event: React.DragEvent<HTMLDivElement>) => {
|
||||
if (
|
||||
!readOnly &&
|
||||
hasTarget(editor, event.target) &&
|
||||
!isEventHandled(event, attributes.onDragStart)
|
||||
) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user