Results 1 to 8 of 8

Thread: Ext.Element.getAttribute not working in IE10

Hybrid View

Previous Post Previous Post   Next Post Next Post
    Looks like we can't reproduce the issue or there's a problem in the test case provided.
  1. #1
    Sencha User
    Join Date
    Aug 2011
    Posts
    51
    Vote Rating
    16
      0  

    Default Ext.Element.getAttribute not working in IE10

    Hello,

    given markup:
    HTML Code:
    <a id="linkId" class="logo-rFactor" download="rFactorPlugin" href="#">rFactor</a>
    and running:
    Code:
    var el = Ext.get('linkId');
    var value = el.getAttribute('download');
    works fine in all browsers but IE10. In IE10, 'value' is null; However when examining the element in debugger,
    I can see that :
    Code:
    el.dom.attributes["download"].value    "rFactorPlugin" String
    or
    Code:
    el.dom.getAttribute('download')
    both return the correct value;

    This leads me to conclusion that ext.js is not getting the attribute values in IE10 correctly.

  2. #2
    Sencha - Ext JS Dev Team evant's Avatar
    Join Date
    Apr 2007
    Location
    Sydney, Australia
    Posts
    18,371
    Vote Rating
    858
      0  

    Default

    I've looked into your test case with the current 4.2 working branch and this issue appears to be already resolved. Thanks for the test case.
    Evan Trimboli
    Sencha Developer
    Twitter - @evantrimboli
    Don't be afraid of the source code!

  3. #3
    Sencha User
    Join Date
    Aug 2011
    Posts
    51
    Vote Rating
    16
      0  

    Default

    Thanks sounds good. When can we expect to get the working code? Millions of people are using IE10, and the number is not going to be shrinking...

    If not a release date, at least please say weeks/months/half year...

  4. #4
    Ext JS Premium Member
    Join Date
    Feb 2010
    Posts
    38
    Vote Rating
    1
      1  

    Default

    I agree, its already out on Win8, RC1 or 2 is out for Win7. Seems like GA for Win7 will be arriving shortly, would be nice to actually hear when 4.2 will be out so we can start telling customers when they can expect full support. Surprised more people aren't concerned about the lack of response for this.

  5. #5
    Ext JS Premium Member
    Join Date
    Apr 2010
    Posts
    20
    Vote Rating
    0
      0  

    Default

    This bug is also present in ExtJS 3. Are there any suggested fixes or patches for it on 3?

  6. #6
    Sencha User
    Join Date
    Dec 2010
    Posts
    6
    Vote Rating
    1
      1  

    Default

    For those of you who can't wait for the next version, I've made a workaround for this problem in ExtJs version 4.1.1.1. Feel free to use it (at your own risk).

    Code:
    Ext.override(Ext.dom.Element, {
        getAttribute: (Ext.isIE6 || Ext.isIE7 || Ext.isIE8) ?
            function (name, ns) {
                var d = this.dom,
                        type;
                if (ns) {
                    type = typeof d[ns + ":" + name];
                    if (type != 'undefined' && type != 'unknown') {
                        return d[ns + ":" + name] || null;
                    }
                    return null;
                }
                if (name === "for") {
                    name = "htmlFor";
                }
                return d[name] || null;
            } : function (name, ns) {
                var d = this.dom;
                if (ns) {
                    return d.getAttributeNS(ns, name) || d.getAttribute(ns + ":" + name);
                }
                return d.getAttribute(name) || d[name] || null;
            }
    });
    It might work for other versions too unless the 'getAttribute' function in that version is too different.

    Cheers,
    Boyd

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •