Hi,

I raised a question in the "Help" section of the forum initially, but after some research I found out that this is actually a bug.

The issue is the following: using the "Basic" example of drag and drop from the explorer I created a window which contains the drag and drop. I then placed a NamedFrame (IFrame) on the screen together with the Window containing the dnd.

When the window is clear of the IFrame, the dnd works perfectly, however, as soon as I move the window over the IFrame, the portion over the IFrame no longer allows for drag and drop. The reason for this is that when the dnd is started, something, somewhere (still looking for where this happens) adds a div with the class x-drag-overlay over the IFrame. If you look at the ext-all.css and modify the x-drag-overlay to have a grey background, you can clearly see it sitting on top of the Window and blocking the dnd. Also, if you change the z-index of the x-drag-overlay (or simply remove it) you will see that the window sits on top of the grey background and dnd works again.

I pasted below the code for the EntryPoint and the window class. No other code should be required to reproduce this:

MainEntryPoint.java:

Code:
package org.yournamehere.client;

import com.extjs.gxt.ui.client.GXT;
import com.extjs.gxt.ui.client.core.El;
import com.extjs.gxt.ui.client.dnd.DragSource;
import com.extjs.gxt.ui.client.dnd.DropTarget;
import com.extjs.gxt.ui.client.event.ButtonEvent;
import com.extjs.gxt.ui.client.event.DNDEvent;
import com.extjs.gxt.ui.client.event.SelectionListener;
import com.extjs.gxt.ui.client.util.Theme;
import com.extjs.gxt.ui.client.widget.HorizontalPanel;
import com.extjs.gxt.ui.client.widget.Html;
import com.extjs.gxt.ui.client.widget.LayoutContainer;
import com.extjs.gxt.ui.client.widget.layout.FlowData;
import com.google.gwt.core.client.EntryPoint;
import com.google.gwt.user.client.ui.Button;
import com.google.gwt.user.client.ui.NamedFrame;
import com.google.gwt.user.client.ui.RootPanel;

public class MainEntryPoint implements EntryPoint {
    
    /** Creates a new instance of MainEntryPoint */
    public MainEntryPoint() {
    }
    
    /**
     * The entry point method, called automatically by loading a module
     * that declares an implementing class as an entry-point
     */
    public void onModuleLoad() {


        GXT.setDefaultTheme(Theme.BLUE, true);

        MyWindow mw = new MyWindow();
        mw.show();

        NamedFrame iframe = new NamedFrame("myname");
        iframe.setUrl("http://www.google.com");
        iframe.setWidth("300");
        iframe.setHeight("300");

        RootPanel.get().add(iframe);
    }

}
And now the window with dnd: MyWindow.java:

Code:
/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package org.yournamehere.client;

import com.extjs.gxt.ui.client.Style.Orientation;
import com.extjs.gxt.ui.client.Style.Scroll;
import com.extjs.gxt.ui.client.core.El;
import com.extjs.gxt.ui.client.dnd.DragSource;
import com.extjs.gxt.ui.client.dnd.DropTarget;
import com.extjs.gxt.ui.client.event.DNDEvent;
import com.extjs.gxt.ui.client.widget.HorizontalPanel;
import com.extjs.gxt.ui.client.widget.Html;
import com.extjs.gxt.ui.client.widget.LayoutContainer;
import com.extjs.gxt.ui.client.widget.Window;
import com.extjs.gxt.ui.client.widget.layout.FlowData;
import com.extjs.gxt.ui.client.widget.layout.RowLayout;

/**
 *
 * @author agiannone
 */
public class MyWindow extends Window {

    public MyWindow() {


             //   this.setLayout(new FirLayout());
        this.setScrollMode(Scroll.AUTOX);
        this.setShim(true);
        this.setShadow(true);
        this.setBorders(false);
        this.setFrame(true);
        this.setDraggable(true);
        this.setClosable(true);
        this.setResizable(false);
        this.setHeading("Live Chat");
        this.setHeight(490);
        this.setWidth(400);
       // this.getHeader().addTool(getRefreshTool());
        this.setMonitorWindowResize( true );


     HorizontalPanel hp = new HorizontalPanel();
     hp.setSpacing(10);

        final LayoutContainer outerContainer = new LayoutContainer();

        outerContainer.setLayout(new RowLayout( Orientation.VERTICAL ));
        outerContainer.setScrollMode( Scroll.AUTOX );

        outerContainer.setBorders(true);
        outerContainer.setHeight(200);
        outerContainer.setWidth(270);
        outerContainer.setLayoutOnChange(true);

     DropTarget target = new DropTarget(outerContainer) {
       @Override
       protected void onDragDrop(DNDEvent event) {
         super.onDragDrop(event);
         Html html = (Html) event.data;
         outerContainer.add(html);
       }
     };
     target.setGroup("test");
     target.setOverStyle("drag-ok");

     final LayoutContainer sourceContainer = new LayoutContainer();
     sourceContainer.setLayoutOnChange(true);
     sourceContainer.setWidth(100);

     addSources(sourceContainer);


     hp.add(outerContainer);
     hp.add(sourceContainer);

      this.add(hp);
    }


   private void addSources(LayoutContainer container) {
     for (int i = 0; i < 5; i++) {
       final Html html = new Html("Drag Me " + i);
       html.setStyleAttribute("padding", "5px");
       html.setStyleAttribute("border", "1px solid red");
       html.setStyleAttribute("cursor", "default");
       html.setStyleName("text");
       container.add(html, new FlowData(3));

       DragSource source = new DragSource(html) {
         @Override
         protected void onDragStart(DNDEvent event) {
           // by default drag is allowed
           event.data = html;
           event.status.update(El.fly(html.getElement()).cloneNode(true));
         }
       };
       // group is optional
       source.setGroup("test");
     }
   }

}
Please note that the Basic dnd example has been slightly modified above (only a couple of lines) but nothing that impacts the dnd behaviour when the Window is not on top of an IFrame.

Is this enough information? or is more required? I can attach screenshots if necessary.

Also, which component sets the DIV with the x-drag-overlay style?

Thanks,
Ale