Drag/drop placeholder doesn't work if placeholder is smaller than draggable list elements
还没有人认领这个 Issue。
- 主要语言
- TypeScript
- 星标
- 25k
- 派生
- 6.8k
- 平均合并
- 1 天 8 小时
- 30 天内合并 PR
- 91
描述
Bug, feature request, or proposal:
Bug
What is the expected behavior?
The placeholder should be placed correctly, regardless of if the placeholder is the same size as the list elements or a different size.
What is the current behavior?
The placeholder is in the wrong spot in the list while dragging an element, but only if the placeholder is smaller (less height for a vertical list, or less width for a horizontal list).
What are the steps to reproduce?
Stackblitz: https://angular-ztyby3.stackblitz.io
Drag the top element down. Observe that the placeholder moves to the top. Then, move it back upwards, and observe that the placeholder moves to the bottom. This is the opposite of how the placeholder should work.
What is the use-case or motivation for changing an existing behavior?
It does not work as expected.
Which versions of Angular, Material, OS, TypeScript, browsers are affected?
@angular/*: 8.0.0
OS: Win10
TS: 3.4.5
Is there anything else we should know?
贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
调研方向
从链接的 StackBlitz 复现开始,使用报告中的 Angular 8 配置复现拖放行为。然后跟踪 Angular 的拖放实现,该实现负责为大小不同的列表元素定位 placeholder。当向下拖动一个元素再拖回向上时,placeholder 始终保持在正确位置,包括该元素小于列表元素的情况,即表示完成。
由索引模型根据 Issue 内容生成。
评估
- 技术栈
- angular, typescript
- 领域
- frontend
- Issue 类型
- 缺陷
- 难度
- 3/5
- 预计耗时
- 1-2 天
- 活跃度
- 停滞
- 描述清晰度
- 基本清楚
- 新手友好度
- 35/100