From a33f62b372e50568cae59c1aca2d6268b0108b95 Mon Sep 17 00:00:00 2001 From: LaySent Date: Sun, 8 Apr 2018 16:42:41 +0800 Subject: [PATCH] Fix drop issue The problem: Previously when file is dropped, `_dragCount` will not be cleared and remains positive. Next time when drag enter and leave, it won't change back to "edit" mode, as `_dragCount` is not 0 but still positive. --- src/component/handlers/drag/DraftEditorDragHandler.js | 1 + 1 file changed, 1 insertion(+) diff --git a/src/component/handlers/drag/DraftEditorDragHandler.js b/src/component/handlers/drag/DraftEditorDragHandler.js index 0f5b7015b3..5c7131351d 100644 --- a/src/component/handlers/drag/DraftEditorDragHandler.js +++ b/src/component/handlers/drag/DraftEditorDragHandler.js @@ -84,6 +84,7 @@ var DraftEditorDragHandler = { ); e.preventDefault(); + editor._dragCount = 0; editor.exitCurrentMode(); if (dropSelection == null) {