You found a bug! We've classified it as EXTJSIV-7698 . We encourage you to continue the discussion and to find an acceptable workaround while we work on a permanent fix.
  1. #1
    Sencha Premium Member
    Join Date
    May 2009
    Posts
    122
    Vote Rating
    7
    ZachG is on a distinguished road

      0  

    Default [4.1.3] Window focus thrashing after message box close

    [4.1.3] Window focus thrashing after message box close


    REQUIRED INFORMATION




    Ext version tested:
    • Ext 4.1.3.548 (240477695016a85fb9ed1098fd5f8e116327fcc3)

    Browser versions tested against:
    • Chrome
    Description:
    • A modal window is opened.
    • A button pressed on the window causes the MessageBox to open.
    • After a timeout, the message box is hidden, then another modal window is opened.
    • In 4.1.2, this works fine.
    • In 4.1.3, the windows flash on top of each other.

    Steps to reproduce the problem:
    • Listen on the me.focusTask.delay line of Ext.Component.prototype.focus method.
    • Run the code below.
    • Click on the "Open Inner Window" button.

    The result that was expected:
    • In 4.1.2, after the inner window opens it doesn't flash.

    The result that occurs instead:
    • In 4.1.3, the modal windows flash as they try to focus and blur each other.

    Test Case:


    Code:
    Ext.onReady(function()	{
    	var outerWindow;
    	
    	outerWindow = Ext.create("Ext.window.Window", {
    		width:500,
    		height:500,
    		modal:true,
    		layout:"fit",
    		items:[
    			{
    				xtype:"button",
    				text:"Open Inner Window",
    				handler:function()	{
    					Ext.MessageBox.wait("Loading...");
    					
    					setTimeout(function()	{
    						Ext.MessageBox.hide();
    				
    						var innerWindow;
    						
    						innerWindow = Ext.create("Ext.window.Window", {
    							width:400,
    							height:400,
    							modal:true,
    							layout:"fit",
    							items:[
    								{
    									xtype:"button",
    									text:"Open Inner Inner Window",
    									handler:function()	{
    debugger;
    									}
    								}
    							]
    						});
    						innerWindow.show();
    					}, 1000);
    				}
    			}
    		]
    	});
    	outerWindow.show();
    });





    HELPFUL INFORMATION



    Debugging already done:
    • By setting Ext.window.Window.prototype.focusOnToFront = false, they don't flash anymore.
    • I'm not sure what repercussions setting that flag will have, but it seems ok.

  2. #2
    Sencha - Senior Forum Manager mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    St. Louis, MO
    Posts
    34,121
    Vote Rating
    453
    mitchellsimoens has much to be proud of mitchellsimoens has much to be proud of mitchellsimoens has much to be proud of mitchellsimoens has much to be proud of mitchellsimoens has much to be proud of mitchellsimoens has much to be proud of mitchellsimoens has much to be proud of mitchellsimoens has much to be proud of mitchellsimoens has much to be proud of mitchellsimoens has much to be proud of

      0  

    Default


    Thanks for the report.
    Mitchell Simoens @SenchaMitch
    Sencha Inc, Senior Forum Manager
    ________________
    http://www.JSONPLint.com - Source to lint your JSONP!

    Check out my GitHub, lots of nice things for Ext JS 4 and Sencha Touch 2
    https://github.com/mitchellsimoens

    Think my support is good? Get more personalized support via a support subscription. https://www.sencha.com/store/

    Need more help with your app? Hire Sencha Services services@sencha.com

    Want to learn Sencha Touch 2? Check out Sencha Touch in Action that is almost in print!

    When posting code, please use BBCode's CODE tags.

  3. #3
    Sencha - Ext JS Dev Team Animal's Avatar
    Join Date
    Mar 2007
    Location
    Notts/Redwood City
    Posts
    30,459
    Vote Rating
    18
    Animal has a spectacular aura about Animal has a spectacular aura about Animal has a spectacular aura about

      0  

    Default


    Can you repro this on the 4.2 beta?

    I cannot repro with latest code with your example.