Ticket #3089: 3089_4.patch

File 3089_4.patch, 2.8 KB (added by Garry Yao, 15 years ago)
  • _source/tests/core/dom/element.html

     
    400400                        var element = new CKEDITOR.dom.element( document.getElementById( 'tabIndexScriptDef' ) );
    401401                        assert.areEqual( null, element.getAttribute( 'tabindex' ) );
    402402                },
     403               
     404                /**
     405                 *  Test getAttribute and getAttribute will ingore  '_cke_expando' attribute.
     406                 */
     407                test_getAttribute_ignoreExpandoAttributes : function()
     408                {
     409                        var element = new CKEDITOR.dom.element( document.getElementById( 'testExpandoAttributes' ) );
     410                        assert.areEqual( 1, element.getAttribute( 'tabindex' ) );
     411                        element.removeAttribute( 'tabindex' );
     412                        assert.areEqual( 'hasExpando', element.getAttribute( 'class' ) );
     413                        element.removeAttribute( 'class' );
     414                        if( CKEDITOR.env.ie )
     415                                assert.areEqual( 'FLOAT: right', element.getAttribute( 'style' ) );
     416                        else
     417                                assert.areEqual( 'float: right;', element.getAttribute( 'style' ) );
     418                        element.removeAttribute( 'style' );
     419                        element.removeAttribute( 'id' );
     420                        assert.isFalse( element.hasAttributes() );
     421                },
    403422
    404423                test_getTabIndex1 : function()
    405424                {
     
    505524        <div id="removeClass"></div>
    506525        <div id="removeOuter"><b id="removeInner"></b></div>
    507526        <div id="tabIndex10" tabindex="10"></div>
     527        <div id="testExpandoAttributes" _cke_expando ="1" class="hasExpando" tabindex="1" style="float:right"></div>
    508528        <div id="tabIndexDef"></div>
    509529        <input id="tabIndexInputDef" />
    510530        <input id="tabIndexInput20" tabindex="20" />
  • _source/core/dom/element.js

     
    397397                                return this.$.getAttribute( name, 2 );
    398398                        };
    399399
    400                         if ( CKEDITOR.env.ie )
     400                        if ( CKEDITOR.env.ie && !CKEDITOR.env.ie8 )
    401401                        {
    402402                                return function( name )
    403403                                {
     
    889889                                return this;
    890890                        };
    891891
    892                         if ( CKEDITOR.env.ie )
     892                        if ( CKEDITOR.env.ie && !CKEDITOR.env.ie8 )
    893893                        {
    894894                                return function( name, value )
    895895                                {
     
    953953                                this.$.removeAttribute( name );
    954954                        };
    955955
    956                         if ( CKEDITOR.env.ie )
     956                        if ( CKEDITOR.env.ie && !CKEDITOR.env.ie8  )
    957957                        {
    958958                                return function( name )
    959959                                {
  • _source/core/env.js

     
    104104                         *     alert( "I'm on IE6 or quirks mode!" );
    105105                         */
    106106                        env.ie6Compat = ( version < 7 || env.quirks );
     107                       
     108                        /**
     109                         *  Indicate IE8.
     110                         */
     111                        env.ie8 = (version >= 8);
    107112                }
    108113
    109114                // Gecko.
© 2003 – 2022, CKSource sp. z o.o. sp.k. All rights reserved. | Terms of use | Privacy policy