@seafile/sdoc-editor 3.0.249 → 3.0.250

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -907,18 +907,11 @@ var SideToolbar = function SideToolbar() {
907
907
  resetDragState();
908
908
  }, [handleDrop, isEditorDrag, resetDragState]);
909
909
  var handleDragEnd = (0, _react.useCallback)(function () {
910
- // Both the document listener and React's onDragEnd can observe the same
911
- // native event. Only the first one owns the drag session and may commit it.
910
+ // dragend also fires when the user cancels a drag or releases outside the
911
+ // editor. Only a confirmed drop event may mutate the Slate document.
912
912
  if (!isDraggingEditorElementRef.current) return;
913
-
914
- // Some deployed browsers do not deliver the drop event to the editor.
915
- // The source draggable still receives dragend, so commit a pending side
916
- // drop here as a fallback.
917
- if (pendingSideDropRef.current) {
918
- handleDrop();
919
- }
920
913
  resetDragState();
921
- }, [handleDrop, resetDragState]);
914
+ }, [resetDragState]);
922
915
  (0, _react.useEffect)(function () {
923
916
  var editorContainer = getEditorContainer();
924
917
  if (!editorContainer) return undefined;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@seafile/sdoc-editor",
3
- "version": "3.0.249",
3
+ "version": "3.0.250",
4
4
  "main": "dist/index.js",
5
5
  "scripts": {
6
6
  "test": "jest",
@@ -71,5 +71,5 @@
71
71
  "publishConfig": {
72
72
  "access": "public"
73
73
  },
74
- "gitHead": "c7f6bb39019dd763b4a9bc3f55f04e397d09b04a"
74
+ "gitHead": "9c4af0de615f973e844f37e346f7f0d7aeeaf41f"
75
75
  }