Thank you for reporting this bug. We will make it our priority to review this report.
  1. #1
    Sencha User bt_bruno's Avatar
    Join Date
    Mar 2008
    Location
    Redwood City, CA
    Posts
    154
    Vote Rating
    10
    bt_bruno will become famous soon enough

      0  

    Default [FIXED-600] 'unloadListeners' is null or not an object

    [FIXED-600] 'unloadListeners' is null or not an object


    Ext version tested:
    • Ext 3.1.1

    Adapter used:
    • ext

    css used:
    • only default ext-all.css


    Browser versions tested against:
    • IE8

    Operating System:
    • WinXP Pro

    Description:
    • Unload events attached to the body element causes issues with Ext default unload behavior.

      It has been noticed in a post at premium area but with no feedback from the user: unloadListeners is null or not an object?

    Test Case:

    Really simple to simulate. Create this html file, load on IE8 with debugging activated, and hit F5 to reload. I guess in firefox the error occurs too but it bypasses the error notification as it is on unload event.

    Code:
    <html>
        <head>
            <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
            <title>Ext Unload Bug</title>
            
    		<link rel="stylesheet" type="text/css" href="../../resources/css/ext-all.css"/>
    		<script type="text/javascript" src="../../adapter/ext/ext-base-debug.js"></script>
            <script type="text/javascript" src="../../ext-all-debug.js"></script>
    		
    		
    		<script type="text/javascript">
    			
    			Ext.onReady(function()
    			{
    				Ext.EventManager.on( Ext.getBody() 	,'unload' ,function()
    				{
    					//do something
    					
    				},this)
    			});
    			
    		</script>
    		
        </head>
        <body>
        </body>
    </html>
    Debugging already done:
    • In ext-base-all.js we can see this on _unload method:
      Code:
      unloadListeners = null;
                  Ext.EventManager._unload();
      First the unloadListeners is clean, and then Ext.EventManager._unload(); is fired. Somewhere on Ext.EventManager._unload(); method chain it calls removeListener(), to remove the unload event attached by us at the body element. That's when unloadListeners is null and the error occours

    Possible fix:
    • clear unloadListeners after call Ext.EventManager._unload();

  2. #2
    Sencha User Jamie Avins's Avatar
    Join Date
    Mar 2007
    Location
    Redwood City, California
    Posts
    3,661
    Vote Rating
    20
    Jamie Avins is a jewel in the rough Jamie Avins is a jewel in the rough Jamie Avins is a jewel in the rough

      0  

    Default


    Fixed in ext-core 144 - 3.1.x and 3.2.x branches.

Thread Participants: 1