CDK drag drop not working when we add CSS transform on cdkDragHandle
See original GitHub issueIs 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); }`
Reproduction
[Steps to reproduce:
- Go to (https://stackblitz.com/edit/angular-cdk-drag-drop-sortable-flex-wrap-v2-9v5zik)
- Drag using (+) drag icon
- 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:
- Created a year ago
- Comments:6 (3 by maintainers)
Top 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 >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I’m closing this issue since the module is working as expected. It can be reopened if any other issues come up.
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.