angular / angular/components

bug(cdkDrag): Items in DropLIst Jump Down When Using DragBoundary or ConstrainPosition with Custom Preview

オープン
#30,439 コメント 1 件 リアクション 1 件 担当者 0 名 GitHub で見る
area: cdk/drag-drop P3
主要言語
TypeScript
スター
25k
フォーク
6.8k
平均マージ
1日 8時間
マージ済み PR(30日)
91

説明

### Is this a regression?

- [ ] Yes, this behavior used to work in the previous version

### The previous version in which this bug was not present was

_No response_

### Description

Items with a custom preview inside of a drop list that should be constrained either by constrainPosition or a dragBoundary appear to jump down for one frame when being dragged before constraint is applied.

### Reproduction

StackBlitz link: https://stackblitz.com/edit/stackblitz-starters-eyxb1gn5?file=src%2Fmain.ts

### Expected Behavior

Constraints are applied to drag preview on starting frame of drag.

### Actual Behavior

Constraints are not applied to drag preview until the second frame of the dragging.

### Environment

- Angular: 19.0.6
- CDK/Material: 19.1.2
- Browser(s): Chrome/Firefox
- Operating System (e.g. Windows, macOS, Ubuntu): Windows

コントリビューションガイド

コントリビューションガイドを開く

調査の方向性

リンクされた StackBlitz の再現と、そのエントリポイントである src/main.ts から始め、Chrome または Firefox でカスタムプレビューと dragBoundary または constrainPosition のいずれかを使ってドラッグ動作を再現します。ドラッグプレビューの制約が開始フレームで適用され、1 フレーム分下方向にジャンプしなければ完了です。

索引モデルが issue の本文から書いたものです。

評価

技術スタック
angular, typescript
領域
frontend
issue の種類
バグ
難易度
3/5
見積もり時間
1〜2日
活発さ
停滞
明瞭さ
おおむね明確
初心者へのやさしさ
45/100

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。