[go: nahoru, domu]

Skip to content

Commit

Permalink
fix: 修复侧边栏 tab 拖拽时拖拽图显示问题
Browse files Browse the repository at this point in the history
  • Loading branch information
EAGzzyCSL committed Feb 28, 2022
1 parent fb18a74 commit f20618f
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions packages/main-layout/src/browser/tabbar/bar.view.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -100,8 +100,11 @@ export const TabbarViewBase: React.FC<{
dragImage.classList.add(tabClassName);
}
document.body.appendChild(dragImage);
e.dataTransfer.setDragImage(dragImage, 0, 0);
setTimeout(() => document.body.removeChild(dragImage), 0);
e.persist();
requestAnimationFrame(() => {
e.dataTransfer.setDragImage(dragImage, 0, 0);
document.body.removeChild(dragImage);
});
}
tabbarService.handleDragStart(e, containerId);
}}
Expand Down

0 comments on commit f20618f

Please sign in to comment.