Results 1 to 4 of 4

Thread: Ext JS 3.4.4.1: Drag & Drop broken

    Thank you for reporting this bug. We will make it our priority to review this report.
  1. #1

    Default Ext JS 3.4.4.1: Drag & Drop broken

    Ext version tested:
    Ext 3.4.1.1 (Ext 3.4.0 works fine)

    Browser versions tested against:
    Chrome 27
    FF 21
    IE 9
    IE 10

    Description:
    Drag & Drop works fine as long as all registered DropZones still exist in the DOM.
    But this isn't always the case, just think of closable Ext.TabPanel or Ext.Window. So if you have a drop-target in a window or in a tab panel, and then you close the window/panel and then start a drag operation (eg. from a tree panel) it will break.

    Fix:

    This should do the trick:

    Code:
    Ext.dd.DragDropMgr.getZIndex = function(element) {
        var body = document.body,
            z,
            zIndex = -1;
        var overTargetEl = element;
    
        element = Ext.getDom(element);
        while (element !== body) {
    
            // this fixes the problem
            if(!element) {
                this._remove(overTargetEl); // remove the drop target from the manager
                break;
            }
            // fix end
    
            if (!isNaN(z = Number(Ext.fly(element).getStyle('zIndex')))) {
                zIndex = z;
            }
            element = element.parentNode;
        }
        return zIndex;
    };

  2. #2
    Sencha Premium User mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    40,449

    Default

    Thanks for the report! I have opened a bug in our bug tracker.

  3. #3

    Default

    I can confim this issue. Thanks for the fix - works well.
    Tocco AG - technology meets spirit
    http://www.tocco.ch

  4. #4
    Sencha Premium User jvandemerwe's Avatar
    Join Date
    Apr 2009
    Location
    Raalte, Netherlands
    Posts
    260

    Default Thank you

    This issue is already around for quite a long time. Recently I had to modify a running Ext 3 application for a customer and this came up again.

    But the solution given really saved the day. Works great. Just my word of gratitude here.

    And where to put it. Well you could put in the top of your app.js. As long as it is overriding the Ext orginal function.

Posting Permissions

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