This issue duplicates another issue.
  1. #1
    Sencha User
    Join Date
    Jan 2012
    Posts
    72
    Vote Rating
    2
    mehran is on a distinguished road

      0  

    Default Incorrect zIndex when dragging one of the two overlapping windows in ExtJS 4.2.1

    Incorrect zIndex when dragging one of the two overlapping windows in ExtJS 4.2.1


    REQUIRED INFORMATION




    Ext version tested:
    • Ext 4.2.1

    Browser versions tested against:
    • Chromium 25.0.1364.160 Ubuntu 12.04
    • FF21 (firebug 1.11.4 installed)

    DOCTYPE tested against:
    • <!DOCTYPE html>

    Description:
    • Having two windows in a browser, the one being dragged goes behind the other one.

    Steps to reproduce the problem:
    • Instantiate two windows.
    • Drag the first one.
    • Drag the second one.
    • Dragging the first one again and moving it in a position till it overlaps with the other window will lead to the window being dragged to move behind the still one.

    The result that was expected:
    • The window being dragged should always be in front (as it used to be in 4.1.2)

    The result that occurs instead:
    • The dragging window hides behind the other windows.

    Test Case:


    Code:
    Ext.define('MyApp.view.MyWindow', {
        extend: 'Ext.window.Window',
    
    
        height: 250,
        width: 400,
        title: 'Main Window',
    
    
        initComponent: function() {
            var me = this;
    
    
            me.callParent(arguments);
        }
    
    
    });
    
    var w1 = Ext.create("MyApp.view.MyWindow", {
        title: 'Main Window 1'
    });
    w1.show();
    
    
    var w2 = Ext.create("MyApp.view.MyWindow", {
        title: 'Main Window 2'
    });
    w2.show();

  2. #2
    Sencha - Ext JS Dev Team evant's Avatar
    Join Date
    Apr 2007
    Location
    Sydney, Australia
    Posts
    17,000
    Vote Rating
    649
    evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute

      0  
    Evan Trimboli
    Sencha Developer
    Twitter - @evantrimboli
    Don't be afraid of the source code!

  3. #3
    Sencha Premium Member fbrus001's Avatar
    Join Date
    Oct 2011
    Posts
    11
    Vote Rating
    3
    fbrus001 is on a distinguished road

      0  

    Default Workaround

    Workaround


    Code:
    Ext.define('My.App.Overrides', {}, function () {
        Ext.require([
                'Ext.window.Window'
            ], function () {
    
                Ext.window.Window.override({
                    initDraggable: function () {
                        this.callOverridden(arguments);
                        this.dd.on('drag', function () {
                            this.ghostPanel.setZIndex(Ext.WindowManager.getActive().getEl().dom.style.zIndex);
                        }, this);
                    }
                });
            });
    
    });

Thread Participants: 2

Tags for this Thread