question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

CDK drag drop not working when we add CSS transform on cdkDragHandle

See original GitHub issue

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

As per Given UI I want to show cdkDragHandle(+) little bit away from drag item, To match GUI I am using CSS transform on cdkDragHandle so that it will placed away from drag items please refer below screenshot.

I have added specific width on draglist(50px) and CSS transform(-150px) on draghandle, when i am trying to drag and drop item it is not working as expected.

If i remove below css from app.component.css, it works fine, ` .cdk-drop-list { width: 50px; }

.cdk-drag-handle { transform: translateX(150px); }` image

Reproduction

[Steps to reproduce:

  1. Go to (https://stackblitz.com/edit/angular-cdk-drag-drop-sortable-flex-wrap-v2-9v5zik)
  2. Drag using (+) drag icon
  3. Ideally it should drop dragged item to new position

Expected Behavior

When i am dragging item to new position it should be dragged and dropped to new position.

Actual Behavior

When i am dragging item to new position it is not getting dropped to new position.

Environment

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

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:6 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
crisbetocommented, Apr 22, 2022

I’m closing this issue since the module is working as expected. It can be reopened if any other issues come up.

0reactions
angular-automatic-lock-bot[bot]commented, May 23, 2022

This issue has been automatically locked due to inactivity. Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Angular cdkDragDrop behavior changed with update of ...
Part of the functionality is to change a property of the underlying object when the user starts dragging. To get the UI to...
Read more >
Drag and Drop | Angular Material
cdk -drag-animating - This class is added to a cdkDrag when the user has stopped dragging. If you add a transition to it,...
Read more >
Getting to Know the Angular CDK Drag and Drop Feature
In this article, we'll learn how to use the drag and drop feature. ... First, we need to install the angular cdk package...
Read more >
Angular Material Drag and Drop – Strengths and Limitations
In an existing angular application with the CDK installed, import the DragDropModule from @angular/cdk/drag-drop into the appropriate NgModule.
Read more >
Angular Drag and Drop - Javatpoint
cdk -drag-animating - This class is added to cdkDrag when the user has stopped dragging. If you add a transition, cdkDropList will animate...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found