[CLOSED] [#631] GridPanel header, Tab key navigation exception: Unable to get property 'apply' of undefined or null reference

  1. #1

    [CLOSED] [#631] GridPanel header, Tab key navigation exception: Unable to get property 'apply' of undefined or null reference

    Hi,

    To reproduce this problem open following link: (I have tried in Chrome and IE 11)

    https://examples3.ext.net/Examples/G...ayGrid/Simple/

    Then click "tab" key few times until first column header become focused. If you click Tab key again the exception will be thrown.




    This is where exception is thrown:

    Ext.grid.header.Container.override({
        onHeaderCtEvent: function (e, t) {
            if (e.getTarget('.x-grid-header-widgets', this.el)) {
                return false;
            }
    
            return this.callParent(arguments);
        },
    
        afterRender: function () {
            this.callParent(arguments);
    
            if (this.focusableKeyNav) {
                this._processBinding = this.focusableKeyNav.map.processBinding;
                this.focusableKeyNav.map.processBinding = this.processBinding;
                this.focusableKeyNav.map.ignoreInputFields = true;
            }
        },
    
        processBinding: function (binding, e) {
            if (e.getTarget('.x-grid-header-widgets', this.el)) {
                return;
            }
    
            // --------------- THE EXCEPTION IS THROWN HERE ------------------
            this._processBinding.apply(this.focusableKeyNav.map, arguments);
        }
    });
    The focusableKeyNav is undefined.


    I have tested in on very simple example (only one column, no data) and the same problem occurs:

    <%@ Page Language="C#" %>
    <!DOCTYPE html>
    
    <html>
    <head runat="server">
        <title>Ext.NET v3 Example</title>
    </head>
    <body>
        <form runat="server">
            <ext:ResourceManager runat="server" />
    
            <ext:GridPanel
                runat="server">
                
                <ColumnModel runat="server">
                    <Columns>
                        <ext:Column
                            runat="server"
                            Text="Name"
                            DataIndex="ProjectName">
                        </ext:Column>
                    </Columns>
                </ColumnModel>
            </ext:GridPanel>
        </form>
    </body>
    </html>
    Attached Thumbnails Click image for larger version. 

Name:	tab-exception.png 
Views:	17 
Size:	62.1 KB 
ID:	18381  
    Last edited by Daniil; Jan 07, 2015 at 4:48 PM. Reason: [CLOSED]
  2. #2

    Quick Fix

    Ext.grid.header.Container.override({
    
    	processBinding: function (binding, e) {
    		if (e.getTarget('.x-grid-header-widgets', this.el)) {
    			return;
    		}
    
    		if (this.focusableKeyNav) {
    			this._processBinding.apply(this.focusableKeyNav.map, arguments);
    		}
    
    	}
    });
    I am not sure if the problem goes deeper than checking if this.focusableKeyNav is defined but for now at least I don't get unhanded exception.
  3. #3
    Hi Matt,

    Thank you for the report. Created an Issue.
    https://github.com/extnet/Ext.NET/issues/631

    I think your fix is correct. I committed it in the revision #6242 (trunk). It goes to v3.1.
  4. #4
    Tested revision #6242 (trunk). The bug is fixed.

    Thank you.

Similar Threads

  1. Replies: 4
    Last Post: Jun 12, 2014, 9:09 PM
  2. Replies: 8
    Last Post: Apr 30, 2014, 3:59 AM
  3. Replies: 3
    Last Post: Mar 13, 2014, 3:58 PM
  4. Replies: 0
    Last Post: Jan 30, 2014, 2:24 PM
  5. Replies: 12
    Last Post: Oct 30, 2013, 6:51 AM

Tags for this Thread

Posting Permissions