There can be more than Notion and Miro. AFFiNE(pronounced [ə‘fain]) is a next-gen knowledge base that brings planning, sorting and creating all together. Privacy first, open-source, customizable and ready to use.
TypeScript appcrdteditorelectronknowledge-basemarkdownmironotesnotionnotion-alternativerustrust-langrust-languagetabletableviewwhiteboardwikiworkspace
fix: drop on editor should prevent default (#9239)
Saul-Mironee0d2f509143b
diff --git a/blocksuite/blocks/src/root-block/widgets/drag-handle/watchers/drag-event-watcher.ts b/blocksuite/blocks/src/root-block/widgets/drag-handle/watchers/drag-event-watcher.tsindex f35a1eb1ee..8b6b6d47dc 100644--- a/blocksuite/blocks/src/root-block/widgets/drag-handle/watchers/drag-event-watcher.ts+++ b/blocksuite/blocks/src/root-block/widgets/drag-handle/watchers/drag-event-watcher.ts@@ -1,4 +1,3 @@-/* eslint-disable @typescript-eslint/no-non-null-assertion */import type { EmbedCardStyle, NoteBlockModel } from '@blocksuite/affine-model';import {EMBED_CARD_HEIGHT,@@ -238,6 +237,8 @@ export class DragEventWatcher {const state = context.get('dndState');const event = state.raw;+ event.preventDefault();+const { clientX, clientY } = event;const point = new Point(clientX, clientY);const element = getClosestBlockComponentByPoint(point.clone());@@ -262,7 +263,6 @@ export class DragEventWatcher {const index =parent.children.indexOf(model) + (result.type === 'before' ? 0 : 1);- event.preventDefault();if (matchFlavours(parent, ['affine:note'])) {const snapshot = this._deserializeSnapshot(state);