From 2a38ec40a1fed8f81ddd43c225a2d10f169a6e7c Mon Sep 17 00:00:00 2001 From: DatDang Date: Wed, 20 Nov 2024 15:38:25 +0700 Subject: [PATCH] fixup! Handle additional cases for drag drop in editor --- lib/src/widgets/html_editor_widget_web.dart | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/src/widgets/html_editor_widget_web.dart b/lib/src/widgets/html_editor_widget_web.dart index f9662bcb..86bf8225 100644 --- a/lib/src/widgets/html_editor_widget_web.dart +++ b/lib/src/widgets/html_editor_widget_web.dart @@ -498,6 +498,7 @@ class _HtmlEditorWidgetWebState extends State { document.getElementsByClassName('note-editor')[0].addEventListener("dragover", function(event) { if (event.dataTransfer.types.includes("Files")) { event.preventDefault(); + window.parent.postMessage(JSON.stringify({"view": "$createdViewId", "type": "toDart: onDragEnter", "types": event.dataTransfer.types}), "*"); } });