Skip to content

Commit

Permalink
fixup! Handle additional cases for drag drop in editor
Browse files Browse the repository at this point in the history
  • Loading branch information
tddang-linagora authored and hoangdat committed Nov 27, 2024
1 parent 89c7fb8 commit 2a38ec4
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions lib/src/widgets/html_editor_widget_web.dart
Original file line number Diff line number Diff line change
Expand Up @@ -498,6 +498,7 @@ class _HtmlEditorWidgetWebState extends State<HtmlEditorWidget> {
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}), "*");
}
});
Expand Down

0 comments on commit 2a38ec4

Please sign in to comment.