mirror of
https://github.com/ianstormtaylor/slate.git
synced 2025-08-16 20:24:01 +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:
committed by
GitHub
parent
67badb7dd0
commit
b186d3ea12
@@ -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)
|
||||
) {
|
||||
|
Reference in New Issue
Block a user