Changeset 958


Ignore:
Timestamp:
10/03/07 11:31:57 (8 years ago)
Author:
martinkou
Message:

Fixed #1308 : Text alignment button states should tie to the visual alignment directly instead of being tied to the immediate block's style attributes.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • FCKeditor/trunk/editor/_source/commandclasses/fckjustifycommands.js

    r931 r958  
    164164                if ( !cssClassRegex )
    165165                {
    166                         // Definitions in the "style" override the "align" attribute, so it
    167                         // gets precedence.
    168                         var currentAlign = firstBlock.style.textAlign || firstBlock.align ;
    169 
     166                        var currentAlign ;
     167                        if ( FCKBrowserInfo.IsIE )
     168                                currentAlign = firstBlock.currentStyle.textAlign ;
     169                        else
     170                                currentAlign = FCK.EditorWindow.getComputedStyle( firstBlock, '' ).getPropertyValue( 'text-align' );
     171                        currentAlign = currentAlign.replace( /(-moz-|-webkit-|start|auto)/i, '' );
    170172                        if ( ( !currentAlign && this.IsDefaultAlign ) || currentAlign == this.AlignValue )
    171173                                return FCK_TRISTATE_ON ;
     174                        return FCK_TRISTATE_OFF ;
    172175                }
    173176                else
Note: See TracChangeset for help on using the changeset viewer.
© 2003 – 2015 CKSource – Frederico Knabben. All rights reserved. | Terms of use | Privacy policy