1. #1
    Ext User
    Join Date
    Aug 2007
    Posts
    1
    Vote Rating
    0
    Silenius is on a distinguished road

      0  

    Post TabPanel and 'Ext.fly(...)' is null or not an object error

    TabPanel and 'Ext.fly(...)' is null or not an object error


    Hello all,

    I've spend a lot of time trying to understand why the 'Ext.fly(...)' is null or not an object error was happening in TabPanel (when changing tab in IE6 and IE7).

    The solution I've found is quite simple, you just have to override the getTarget method, hope this can help someone.

    Code:
    Ext.override(Ext.EventObjectImpl, {
        getTarget : function(selector, maxDepth, returnEl){
            var targetElement;
    
            try {
                targetElement = selector ? Ext.fly(this.target).findParent(selector, maxDepth, returnEl) : this.target;
            } catch(e) {
                targetElement = this.target;
            }
    
            return targetElement;
        }
    });
    Samuel

  2. #2
    Sencha - Community Support Team mystix's Avatar
    Join Date
    Mar 2007
    Location
    Singapore
    Posts
    6,236
    Vote Rating
    5
    mystix will become famous soon enough

      0  

    Default


    hmmm? what's the test code you used on IE6?

  3. #3
    Sencha User
    Join Date
    Aug 2008
    Posts
    28
    Vote Rating
    0
    njw is on a distinguished road

      0  

    Default


    Quote Originally Posted by Silenius View Post
    Hello all,

    I've spend a lot of time trying to understand why the 'Ext.fly(...)' is null or not an object error was happening in TabPanel (when changing tab in IE6 and IE7).

    The solution I've found is quite simple, you just have to override the getTarget method, hope this can help someone.

    Code:
    Ext.override(Ext.EventObjectImpl, {
        getTarget : function(selector, maxDepth, returnEl){
            var targetElement;
    
            try {
                targetElement = selector ? Ext.fly(this.target).findParent(selector, maxDepth, returnEl) : this.target;
            } catch(e) {
                targetElement = this.target;
            }
    
            return targetElement;
        }
    });
    Samuel
    I had the same issue with IE7 and a TreePanel/Node Click event, however, I'm using EXT 2.2.0.

    The above override fixed it just fine.

    Thanks!

  4. #4
    Ext User
    Join Date
    Dec 2008
    Posts
    1
    Vote Rating
    0
    ManishDevraj is on a distinguished road

      0  

    Default Where to place above code

    Where to place above code


    Hello,

    I am getting the same problem on IE7, I have added above code snippet into my application's JS but not able to get rid of the error. Is there any other way to add this snippet?

  5. #5
    Ext User
    Join Date
    Jun 2007
    Posts
    18
    Vote Rating
    0
    mark.lancaster is on a distinguished road

      0  

    Default


    This solution also worked for me using IE6 and Ext 2.2.0

    Thanks

  6. #6
    Ext User
    Join Date
    Mar 2009
    Posts
    3
    Vote Rating
    0
    Vicho is on a distinguished road

      0  

    Default


    I have the same problem... but, a silly question... where put this lines??... in which file? please I am a newbie... thanks in advance!!

  7. #7
    Sencha Premium Member
    Join Date
    Apr 2009
    Posts
    110
    Vote Rating
    0
    Chods is on a distinguished road

      0  

    Default


    I have also just implmented the same fix although i am not too happy about it. I dont know why this is happening.

  8. #8
    Sencha User
    Join Date
    Jun 2009
    Posts
    18
    Vote Rating
    0
    georgec is on a distinguished road

      0  

    Default


    I have had the same problem,.
    The above fix just prevents the error from being thrown.

    I have extjs in an iframe and when the user right clicks a menu with some menu items appears. Before I inserted a fix an error was thrown when an item was selected.
    After the fix no error is thrown but choosing the menu item has no effect whatsoever.

    I am suspecting it is because this.target for some reason appears to be null in IE..

  9. #9
    Ext User skolapper's Avatar
    Join Date
    Sep 2009
    Posts
    2
    Vote Rating
    0
    skolapper is on a distinguished road

      0  

    Default TabPanel and Ext fly is null or not an object error

    TabPanel and Ext fly is null or not an object error


    I am rendering a grid in my project.On firefox, this code works fine.However in IE 7 I get the following error:undefined is null or not an objectI believe the error is occuring on Line 239 in ext-all.js and the following section is highlighted:iftypeof _1i.dataIndex=="undefined"I feel as if Im not providing enough information for you guys to help me with my problem, let me know what else I should provide

  10. #10
    Ext JS Premium Member
    Join Date
    Mar 2007
    Location
    France
    Posts
    223
    Vote Rating
    0
    tof is on a distinguished road

      0  

    Default Thanks

    Thanks


    f*cking IE...

    Well this override is a hacky workaround, but it does work.

    Thank you.
    Christophe Badoit
    aka Tof

    My work : Lesiteimmo.com - Unobstrusive ExtJs Powered !

Turkiyenin en sevilen filmlerinin yer aldigi xnxx internet sitemiz olan ve porn sex tarzi bir site olan mobil porno izle sitemiz gercekten dillere destan bir durumda herkesin sevdigi bir site olarak tarihe gececege benziyor. Sitenin en belirgin ozelliklerinden birisi de Turkiyede gercekten kaliteli ve muntazam, duzenli porno izle siteleri olmamasidir. Bu yuzden iste. Ayrica en net goruntu kalitesine sahip adresinde yayinlanmaktadir. Mesela diğer sitelerimizden bahsedecek olursak, en iyi hd porno video arşivine sahip bir siteyiz. "The Best anal porn videos and slut anus, big asses movies set..." hd porno faketaxi