Ticket #6670: 6670.patch

File 6670.patch, 1.3 KB (added by Tobiasz Cudnik, 13 years ago)
  • _source/plugins/bidi/plugin.js

     
    4848        {
    4949                var editor = evt.editor,
    5050                        chromeRoot = editor.container.getChild( 1 ),
    51                         directionNode = getElementForDirection( evt.data.path.lastElement );
     51                        directionNode = getElementForDirection( evt.data.path.lastElement, 1 );
    5252
    5353                if ( directionNode && editor.lang.dir != directionNode.getComputedStyle( 'direction' ) )
    5454                        chromeRoot.addClass( 'cke_mixed_dir_content' );
     
    5858
    5959        /**
    6060         * Returns element with possibility of applying the direction.
    61          * @param node
     61         * @param {CKEDITOR.dom.node} node
     62         * @param {boolean} includeNodesWithDirection If set to TRUE, includes nodes that already have direction,
     63         *  although inline elements are skipped.
    6264         */
    63         function getElementForDirection( node )
     65        function getElementForDirection( node, includeNodesWithDirection )
    6466        {
    65                 while ( node && !( node.getName() in allGuardElements || node.is( 'body' ) ) )
     67                while ( node && !( node.getName() in allGuardElements || node.is( 'body' ) )
     68                        && !( includeNodesWithDirection && node.getDirection() && !CKEDITOR.dtd.$inline[ node.getName() ] ) )
    6669                {
    6770                        var parent = node.getParent();
    6871                        if ( !parent )
© 2003 – 2022, CKSource sp. z o.o. sp.k. All rights reserved. | Terms of use | Privacy policy