Results 1 to 2 of 2

Thread: Parent container getting dragged on drag of child container

  1. #1
    Sencha User
    Join Date
    Feb 2015
    Posts
    5

    Default Parent container getting dragged on drag of child container

    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?

  2. #2
    Sencha User joel.watson's Avatar
    Join Date
    Nov 2014
    Posts
    3,120
    Answers
    446

    Default

    Quote Originally Posted by mmuneeb View Post
    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, I'll be happy to test this along with you.

    Thanks!
    Joel

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •