Ticket #6728: 6728.patch
File 6728.patch, 1.1 KB (added by , 14 years ago) |
---|
-
_source/plugins/bidi/plugin.js
136 136 return null; 137 137 } 138 138 139 function getFullySelected( range, elements )139 function getFullySelected( range, elements, dir ) 140 140 { 141 141 var ancestor = range.getCommonAncestor( false, true ); 142 142 143 var ancestorDir = ancestor.getDirection(); 144 if ( ancestorDir && ancestorDir != dir ) 145 return ancestor; 146 143 147 range.enlarge( CKEDITOR.ENLARGE_BLOCK_CONTENTS ); 144 148 145 149 if ( range.checkBoundaryOfElement( ancestor, CKEDITOR.START ) … … 187 191 if ( !selectedElement || selectedElement 188 192 && !( selectedElement.type == CKEDITOR.NODE_ELEMENT && selectedElement.getName() in directSelectionGuardElements ) 189 193 ) 190 selectedElement = getFullySelected( range, guardElements );194 selectedElement = getFullySelected( range, guardElements, dir ); 191 195 192 196 if ( selectedElement && !selectedElement.isReadOnly() ) 193 197 switchDir( selectedElement, dir, editor, database );