使用dnd.start拖拽画布外A元素到画布上已生成的目标节点B区域中时,目标节点B的原生事件dragenter,dragover,dragleave, drop事件都无法触发。希望可以触发
- Dominant language
- TypeScript
- Stars
- 6.7k
- Forks
- 1.9k
- PR merge metrics
- No merged PRs in 30d
Description
### 功能描述
问题:
页面分为左侧画布外的侧边栏区域,和右侧的画布区域:
1、为左侧边栏的源节点A绑定**dragstart事件**,拖动A节点到画布上时,事件处理函数会调用dnd.start(node)方法创建一个自定义的拖拽节点A1,放置到画布上时会生成自定义的放置节点A2
2、为A的放置节点容器上**绑定dragenter,dragover,dragleave, drop事件**
3、当想将左侧边栏的另一个源节点B 拖拽到 画布上已存在的目标节点 A内时,A的放置节点的原生事件dragenter,dragover,dragleave, drop并不会触发。
**排查发现正是dnd.start()导致以上原生的drag相关事件不会被触发**
### 期望解决方案
希望使用dnd.start后,也可以触发画布上目标节点区域内的dragenter,dragover,dragleave, drop事件
Contributor guide
Research direction
Start by inspecting the dnd.start entry point and how it handles dragging from the sidebar onto the canvas. Reproduce dragging a source node into an existing target node, then verify that the target's native dragenter, dragover, dragleave, and drop events are triggered after the fix.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- frontend
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100