1. #1
    Ext Premium Member
    Join Date
    Apr 2007
    Location
    Paris, IDF
    Posts
    16
    Vote Rating
    0
    Nicolas BUI is on a distinguished road

      0  

    Default [3.3.1 - Override] Fix annoying IE error

    [3.3.1 - Override] Fix annoying IE error


    When developping complex application, you will find yourself struggle with IE random error (sometime making application break).

    I have identified some of the random bugs :
    - animation sometime failed as the required element sometime is not available (The code base do not check if the element exists or not, see fxUnwrap)
    - IE randomly hate syntax like this (found in ExtJS code base) :
    var d = this.dom, type = typeof d[ns+':'+name];

    So I've create an override that fix thoses things, hoping it will help you kick the IE in the asses :
    PHP Code:
    (function()
    {
      var 
    flyEl = new Ext.Element.Flyweight();
      var 
    fly = function(dom)
      {
        
    flyEl.dom dom;
        
    flyEl.id Ext.id(dom);
        return 
    flyEl;
      };
      
    Ext.Fx.fxUnwrap = function(wrapposo)
      {
        var 
    dom this.dom;
        
    fly(dom).clearPositioning();
        
    fly(dom).setPositioning(pos);
        if (!
    o.wrap) {
          var 
    pn fly(wrap).dom.parentNode;
          if (
    pn) { // should check if it's not null
            
    pn.insertBefore(domwrap);
            
    fly(wrap).remove();
          }
        }
      };
      
    Ext.Element.addMethods(Ext.Fx);

      
    // I prefer doing like this because I'm using JSLint so the syntax like under is not really appreciated
      //   Obj.prototype.method = Ext.isIE ? function() { } .. : function() { }
      
    if (Ext.isIE) {
        
    Ext.Element.prototype.getAttribute = function(namens)
        {
          var 
    this.domtype 'undefined';
          try {
            
    // IE sometime failed here, so try to catch the exception
            
    type typeof(d[ns ":" name]);
          }
          catch(
    e) {
            
    type 'undefined';
          }
          if ([
    'undefined''unknown'].indexOf(type) == -1) {
            return 
    d[ns ":" name];
          }
          return 
    d[name];
        };
      }
      else {
        
    Ext.Element.prototype.getAttribute = function(namens)
        {
          var 
    this.dom;
          return 
    d.getAttributeNS(nsname) || d.getAttribute(ns ":" name) || d.getAttribute(name) || d[name];
        };
      }

    })(); 
    As always, don't hesitate to give feedback and contribute this post, because I surely have not covered all possible IE annoyances.

  2. #2
    Ext JS Premium Member
    Join Date
    Apr 2010
    Location
    Midwest, USA
    Posts
    96
    Vote Rating
    2
    Reimius is on a distinguished road

      0  

    Default I hope this works

    I hope this works


    We are going to try this in our App. We keep getting 'null' is null or not an object errors from the ext-base code. If this fixes our problems, you are my hero.

Similar Threads

  1. Annoying GXT Flaws
    By BetterBob in forum Ext GWT: User Extensions and Plugins
    Replies: 5
    Last Post: 8 Apr 2011, 1:19 PM
  2. Validation tip - annoying element
    By deployit in forum Ext 3.x: Help & Discussion
    Replies: 0
    Last Post: 10 Sep 2009, 3:25 AM
  3. Very annoying bug. Any suggestions?
    By shadowHunter in forum Ext 2.x: Help & Discussion
    Replies: 7
    Last Post: 28 Jan 2009, 8:14 AM
  4. Annoying box
    By flatburger in forum Ext 2.x: Help & Discussion
    Replies: 4
    Last Post: 13 Oct 2007, 7:35 AM
  5. Annoying proxies!!
    By jay@moduscreate.com in forum Ext 1.x: Help & Discussion
    Replies: 2
    Last Post: 26 Nov 2006, 3:36 PM

Thread Participants: 1

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