Skip to content

help(COMPONENT): cdkDragConstrainPosition works strange #25046

Closed
@v1nger125

Description

@v1nger125

What are you trying to do?

i'm trying to create some grid with cdkDragConstrainPosition but some clicks cause random movements close to the grid nodes
as an example i create i simple one of your demo with constant values of cdkDragConstrainPosition but it still continue random movement on each drag-drop, does i miss something? in such case i supposed it should stay static
https://stackblitz.com/edit/angular-iwidmo-1kbix8?file=src/app/cdk-drag-drop-free-drag-position-example.html

What troubleshooting steps have you tried?

above

Reproduction

Steps to reproduce:

  1. setup cdkDragConstrainPosition with static values
  2. try to drag-drop it

https://stackblitz.com/edit/angular-iwidmo-1kbix8?file=src/app/cdk-drag-drop-free-drag-position-example.html

Environment

  • Angular:
  • CDK/Material:
  • Browser(s):
  • Operating System (e.g. Windows, macOS, Ubuntu):

Metadata

Metadata

Assignees

Labels

P2The issue is important to a large percentage of users, with a workaroundarea: cdk/drag-drop

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions