angular2-draggable
angular2-draggable copied to clipboard
Click events not working
This is exactly what I was looking for and it is so close to working. However, it unfortunately seems to break my click handlers in my other components when using ngDraggable. I am using version 2.1.2.
@khoying Did you set [preventDefaultEvent]?
I tried setting it to true and to false. It did not help.
Please provide more info about your code snippets, that would be helpful to identify where the problem is.
@xieziyu +1 Click handlers are not working in draggable blocks that are added with *ngFor dynamically. In blocks that were from the beginning in html template - there click handlers work fine. Please fix it for dynamic blocks. Thank you!
Is this fixed?
I'm having the same issue, click handlers don't work when the draggable blocks are added dynamically with ngFor, is there a solution or workaround?
+1 This is really a big problem. Would be great if this would be fixed!
@amir-alic @RodrigoMtz10 Hi, could you help write some codes to reproduce this issue on StackBlitz? I tested the draggable blocks added dynamically with ngFor and their click handlers were working as expected.
@xieziyu
Hello, I found out that dynamically adding divs it's not the problem. I still don't know the root cause of my problem.
I made a test with my StackBlitz: https://stackblitz.com/edit/angular-awyh7l
Problem is: dblclick event is not firing on TEST div. It randomly happens only on my computer.
My workmates tried the dblclick on the stackblitz, and it works well for them, the event is firing.
We are all using Chrome, same version, Windows 10.
I wish I could find out the pattern of the issue but I still can't.
I am also facing the same issue. I have created a stackblitz to repro this issue. Steps to reproduce:
- Drag the first element. This is draggable, as click event is firing.
- Now try to drag the second element. It won't be draggable, because click event is not firing.
Kindly provide a solution to solve this issue.
stackblitz url: https://stackblitz.com/edit/angular2-draggable
+1