PDA

View Full Version : Parent container getting dragged on drag of child container



mmuneeb
24 Feb 2015, 10:54 AM
Hi,
I am using ExtJS 4.2.1.


I have a draggable container within a draggable container. Sometimes (randomly) it so happens that on trying to drag the child container the parent container gets dragged along. This behaviour does not occur all the time but it is quite frequent. I have implemented drag behaviour through DragZone.

I have tried all sorts of hacks but they don't seem to work. The DragZone code for the child container is not executed in this situation instead the DragZone code for the parent container gets executed. Normally, the parent container's DragZone code does not get executed on dragging the child container.

I have tried using preventDefault and stopPropagation but to no avail. I have tried locking too, this locks the parent container from being dragged but the child container's DragZone code still does not get executed.

Could someone please help me out with a solution for this?

joel.watson
6 Mar 2015, 7:34 AM
Hi,


I am using ExtJS 4.2.1.


I have a draggable container within a draggable container. Sometimes (randomly) it so happens that on trying to drag the child container the parent container gets dragged along. This behaviour does not occur all the time but it is quite frequent. I have implemented drag behaviour through DragZone.

I have tried all sorts of hacks but they don't seem to work. The DragZone code for the child container is not executed in this situation instead the DragZone code for the parent container gets executed. Normally, the parent container's DragZone code does not get executed on dragging the child container.

I have tried using preventDefault and stopPropagation but to no avail. I have tried locking too, this locks the parent container from being dragged but the child container's DragZone code still does not get executed.

Could someone please help me out with a solution for this?


Hi--

Can you create a runnable example of the issue you're experiencing? If you can create a Fiddle (https://fiddle.sencha.com), I'll be happy to test this along with you.

Thanks!
Joel