Skip to content

Commit

Permalink
fix: dnd: increase min dnd duration before opening new window
Browse files Browse the repository at this point in the history
this should fix/reduce cases of false positive opening of a new window
when sidebery doesn't get the ondrop event despite the cursor was over
sidebar

(#1947)
  • Loading branch information
mbnuqw committed Jan 23, 2025
1 parent 90c37a2 commit 2f59a28
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/services/drag-and-drop.actions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1236,7 +1236,7 @@ export async function onDragEnd(e: DragEvent): Promise<void> {
if (
!DnD.dropEventConsumed &&
e.dataTransfer?.types.length === 1 &&
Date.now() - lastDragStartTime > 150
Date.now() - lastDragStartTime > 250
) {
const dndInfoStr = e.dataTransfer?.getData('application/x-sidebery-dnd')

Expand Down

0 comments on commit 2f59a28

Please sign in to comment.