Ticket #6686: 6686.patch

File 6686.patch, 671 bytes (added by Tobiasz Cudnik, 9 years ago)
  • _source/plugins/bidi/plugin.js

     
    3333
    3434                selectedElement = selectedElement || path.block || path.blockLimit;
    3535
    36                 if ( !selectedElement || selectedElement.getName() == 'body' )
     36                // If we're having BODY here, user probably done CTRL+A, let's try to get the enclosed node, if any.
     37                selectedElement.is( 'body' ) &&
     38                        ( selectedElement = editor.getSelection().getRanges()[ 0 ].getEnclosedNode() );
     39
     40                if ( !selectedElement )
    3741                        return;
    3842
    3943                var selectionDir = useComputedState ?
© 2003 – 2019 CKSource – Frederico Knabben. All rights reserved. | Terms of use | Privacy policy