kendoDragHandle

1 Answer 58 Views
Drag and Drop
Bryson
Top achievements
Rank 1
Bryson asked on 25 Oct 2024, 01:25 AM
Does the kendoDragHandle have to be a direct child of the kendoDragTarget or can it be a grandchild, grand-grandchild, ect. of the kendoDragTarget?

1 Answer, 1 is accepted

Sort by
0
Martin Bechev
Telerik team
answered on 29 Oct 2024, 03:18 PM

Hi Bryson,

In case you are referring to a similar scenario, the kendoDragHandle needs to be applied to an element inside the kendoDragTarget.

Alternatively, the developer can use the kendoDragTargetContainer and its built-in dragTargetFilter property, which allows targeting the exact custom element that would be dragged regardless of its level. Here is an example:

https://stackblitz.com/edit/angular-xslc1v

Regards,
Martin Bechev
Progress Telerik

Love the Telerik and Kendo UI products and believe more people should try them? Invite a fellow developer to become a Progress customer and each of you can get a $50 Amazon gift voucher.

Bryson
Top achievements
Rank 1
commented on 31 Oct 2024, 12:53 PM | edited

Hi Martin,

Thank you for your reply. So in this (https://stackblitz.com/edit/angular-xslc1v) scenario that you sent me, the kendoDragHandle and the kendoDragTarget can both be used to drag the box.

Here is an example of my confusion. If the <div> wrapped around the kendoDragHandle is there (see link 1), then the kendoDragTarget seems to take over as the kendoDragHandle (aka they can both be used to drag the box). However, when you remove that <div> and the kendoDragHandle becomes the child of the kendoDragTarget (see link 2), then it seems to work as I expect which is that only the kendoDragHandle is able to drag the kendoDragTarget.

Link 1: https://stackblitz.com/edit/angular-vnhjqm?file=src%2Fapp%2Fapp.component.ts

Link 2: https://stackblitz.com/run/?file=src%2Fapp%2Fapp.component.ts 

Let me know what your thoughts are on this 😊 . 

Best,

Bryson Tipton

Martin Bechev
Telerik team
commented on 05 Nov 2024, 08:59 AM

Hi Bryson,

Indeed you are right. Regardless of the structure, the kendoDragHandle has to specify the drag handle correctly.

I logged it in our GitHub issue tracker here:

https://github.com/telerik/kendo-angular/issues/4447

Please subscribe to the issue and be notified when there is any update.

Accept our apologies for the caused inconvenience.

Tags
Drag and Drop
Asked by
Bryson
Top achievements
Rank 1
Answers by
Martin Bechev
Telerik team
Share this question
or