We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c69e651 commit 53c1522Copy full SHA for 53c1522
src/editor/codemirror/dnd.ts
@@ -218,9 +218,8 @@ const findLogicalPosition = (
218
view: EditorView,
219
event: DragEvent
220
): { line: number; indent: number | undefined } => {
221
- const visualLine = view.lineBlockAtHeight(
222
- event.y - view.documentTop || event.clientY - view.documentTop
223
- );
+ const height = (event.y || event.clientY) - view.documentTop;
+ const visualLine = view.lineBlockAtHeight(height);
224
const line = view.state.doc.lineAt(visualLine.from);
225
const pos = view.posAtCoords({
226
x: event.x || event.clientX,
0 commit comments