Ticket #6728: 6728_3.patch
File 6728_3.patch, 1.2 KB (added by , 13 years ago) |
---|
-
_source/plugins/bidi/plugin.js
140 140 return null; 141 141 } 142 142 143 function getFullySelected( range, elements, enterMode )143 function getFullySelected( range, elements, enterMode, dir ) 144 144 { 145 145 var ancestor = range.getCommonAncestor( false, true ); 146 146 147 var ancestorDir = ancestor.getDirection(); 148 if ( ancestorDir && ancestorDir != dir ) 149 return ancestor; 150 147 151 enterMode != CKEDITOR.ENTER_BR && range.enlarge( CKEDITOR.ENLARGE_BLOCK_CONTENTS ); 148 152 149 153 if ( range.checkBoundaryOfElement( ancestor, CKEDITOR.START ) … … 191 195 if ( !selectedElement || selectedElement 192 196 && !( selectedElement.type == CKEDITOR.NODE_ELEMENT && selectedElement.getName() in directSelectionGuardElements ) 193 197 ) 194 selectedElement = getFullySelected( range, guardElements, enterMode );198 selectedElement = getFullySelected( range, guardElements, enterMode, dir ); 195 199 196 200 if ( selectedElement && !selectedElement.isReadOnly() ) 197 201 switchDir( selectedElement, dir, editor, database );