angular / angular/components

cdkDrag: with cdkDropList -> wrong Cursor when dragging

未关闭
#20,246 14 条评论 8 个 reaction 已指派 0 人 在 GitHub 查看
area: cdk/drag-drop P3
主要语言
TypeScript
星标
25k
派生
6.8k
平均合并
1 天 8 小时
30 天内合并 PR
91

描述

Hi all,
![issue_1](https://user-images.githubusercontent.com/10813063/88395832-f91c8700-cdc1-11ea-9184-9188f1340b8c.png)
![issue_2](https://user-images.githubusercontent.com/10813063/88395836-f9b51d80-cdc1-11ea-8e1f-794c089706d6.png)

**Here is a little sample.**
[https://stackblitz.com/angular/yvmnrxexppp?file=app%2Fcdk-drag-drop-connected-sorting-example.html](url)

Since version 7.2.x (I noticed) there is the problem that the cursor (set in CSS) adapts to the underlying object during the dragging process.

If the cursor is changed to "move" and I use e.g. move an "input" (drag) then the cursor changes from move to input.

This phenomenon only occurs with cdkDropList, not when the cdkDrag property is only set for a single object.

The CSS:
```css
.example-box {
padding: 20px 10px;
border-bottom: solid 1px #ccc;
color: rgba(0, 0, 0, 0.87);

display: flex;
flex-direction: row;
align-items: center;
justify-content: space-between;
box-sizing: border-box;
cursor: move;
background: white;
font-size: 14px;
}
```

The HTML:
```html


Still Doing


{{item}}




```

贡献指南

打开贡献指南

调研方向

从链接的 StackBlitz 复现开始,检查拖动 input 元素时 cdkDrag 和 cdkDropList 的行为。确认仅当存在 cdkDropList 时,光标才会从 move 更改为下层元素的光标;当拖动过程中光标始终保持一致时,即表示完成。

由索引模型根据 Issue 内容生成。

评估

技术栈
angular, typescript
领域
frontend
Issue 类型
缺陷
难度
3/5
预计耗时
1-2 天
活跃度
停滞
描述清晰度
基本清楚
新手友好度
38/100

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。