Success! Looks like we've fixed this one. According to our records the fix was applied for EXTJS-5957 in a recent build.
  1. #1
    Sencha User
    Join Date
    Feb 2011
    Posts
    34
    Vote Rating
    0
    naggy is on a distinguished road

      0  

    Default Window stays in front of modal Messagebox

    Window stays in front of modal Messagebox


    Hi,

    If you create a window and afterwards a modal message box, the window stays in front of the message box.

    Regards,
    Markus

    Code:
    Ext.onReady(
        function() {
            var win = Ext.create('widget.window', {
                height: 130,
                width: 309,
                resizable: false,
                closable: false,
                layout: {
                    align: 'stretch',
                    type: 'hbox'
                },
                title: "Window"
            });
    
    
            win.show();
    
    
            var box = Ext.Msg.alert({
                title: "Messagebox",
                msg: "Should be in front of window",
                modal: true,
                buttons: Ext.Msg.OK,
                icon: Ext.Msg.ERROR});
        }
    );

  2. #2
    Sencha User
    Join Date
    Feb 2011
    Posts
    34
    Vote Rating
    0
    naggy is on a distinguished road

      0  

    Default


    Seems to be a timing issue (window creation not completed upon creation of the message box).

    When I do this, it works:

    Code:
    Ext.onReady(
        function() {
            var win = Ext.create('widget.window', {
                height: 130,
                width: 309,
                resizable: false,
                closable: false,
                layout: {
                    align: 'stretch',
                    type: 'hbox'
                },
                title: "Window"
            });
    
    
    
    
            win.show();
    
    
            Ext.defer(function() {
                var box = Ext.Msg.alert({
                    title: "Messagebox",
                    msg: "Should be in front of window",
                    modal: true,
                    buttons: Ext.Msg.OK,
                    icon: Ext.Msg.ERROR});
            }, 100);
        }
    );

  3. #3
    Sencha User
    Join Date
    Feb 2011
    Posts
    34
    Vote Rating
    0
    naggy is on a distinguished road

      0  

    Default


    Hi,

    I've detected this problem in various situations. Is it a bug?

    Regards,
    Markus

  4. #4
    Sencha Premium Member
    Join Date
    Dec 2011
    Posts
    6
    Vote Rating
    1
    r0ro is on a distinguished road

      0  

    Default


    I think it's a bug since it worked as expected with Ext 4.0.7

  5. #5
    Sencha - Support Team slemmon's Avatar
    Join Date
    Mar 2009
    Location
    Boise, ID
    Posts
    4,800
    Vote Rating
    167
    slemmon is a splendid one to behold slemmon is a splendid one to behold slemmon is a splendid one to behold slemmon is a splendid one to behold slemmon is a splendid one to behold slemmon is a splendid one to behold slemmon is a splendid one to behold

      0  

    Default


    I just ran across this, too. I have a window with a grid and on the beforedeselect event I was bringing up a prompt and wondered why it wasn't working until I noticed it hiding behind my window. In my case it wasn't solved by timing. I had to use a toFront() like this:

    Code:
    var mm = Ext.Msg.alert('Status', 'Changes saved successfully.');
    Ext.defer(function () {
        mm.toFront();
    }, 50);

  6. #6
    Sencha - Support Team slemmon's Avatar
    Join Date
    Mar 2009
    Location
    Boise, ID
    Posts
    4,800
    Vote Rating
    167
    slemmon is a splendid one to behold slemmon is a splendid one to behold slemmon is a splendid one to behold slemmon is a splendid one to behold slemmon is a splendid one to behold slemmon is a splendid one to behold slemmon is a splendid one to behold

      0  

    Default


    For what it's worth, my window is modal and I have a toolbar on one of the child components whose select event kicks off a Msg.alert() and that is working just fine - does not hide behind my modal window.

  7. #7
    Sencha Premium Member skirtle's Avatar
    Join Date
    Oct 2010
    Location
    UK
    Posts
    3,501
    Vote Rating
    286
    skirtle has a brilliant future skirtle has a brilliant future skirtle has a brilliant future skirtle has a brilliant future skirtle has a brilliant future skirtle has a brilliant future skirtle has a brilliant future skirtle has a brilliant future skirtle has a brilliant future skirtle has a brilliant future skirtle has a brilliant future

      0  

    Default


    I agree, this doesn't look right to me testing against 4.1.0 RC3. It works as expected using 4.0.7. Moving this thread to the bugs forum.

    My simplified version of the original test case:

    Code:
    Ext.onReady(function() {
        var win = Ext.widget('window', {
            height: 200,
            width: 200
        });
    
        win.show();
    
        Ext.Msg.alert('Title', 'Message');
    });

  8. #8
    Sencha User
    Join Date
    Mar 2012
    Posts
    50
    Vote Rating
    2
    pierresas is on a distinguished road

      0  

    Default


    A fix will be available in 4.1.2. For those of you who have access to the code, the fix is at https://github.com/extjs/SDK/pull/7035

    Thans you for the detailed bug report and the test case.

  9. #9
    Sencha - Support Team slemmon's Avatar
    Join Date
    Mar 2009
    Location
    Boise, ID
    Posts
    4,800
    Vote Rating
    167
    slemmon is a splendid one to behold slemmon is a splendid one to behold slemmon is a splendid one to behold slemmon is a splendid one to behold slemmon is a splendid one to behold slemmon is a splendid one to behold slemmon is a splendid one to behold

      0  

    Default


    Excellent! Thx for the update. Much appreciated.

  10. #10
    Sencha User
    Join Date
    Jan 2013
    Posts
    16
    Vote Rating
    0
    rchernyshenko is on a distinguished road

      0  

    Default


    I have Ext 4.1.3 and this not work. Window appears in front of modal Messagebox.
    Code:
    Ext.onReady(
        function() {
            var win = Ext.create('widget.window', {
                height: 130,
                width: 309,
                resizable: false,
                closable: false,
                layout: {
                    align: 'stretch',
                    type: 'hbox'
                },
                title: "Window"
            });
    
    
    
    
            win.show();
    
    
    
    
            var box = Ext.Msg.alert({
                title: "Messagebox",
                msg: "Should be in front of window",
                modal: true,
                buttons: Ext.Msg.OK,
                icon: Ext.Msg.ERROR});
        }
    );