Ticket #7294: 7294_2.patch
File 7294_2.patch, 1.3 KB (added by , 13 years ago) |
---|
-
_source/plugins/bidi/plugin.js
265 265 // If the element direction changed, we need to switch the margins of 266 266 // the element and all its children, so it will get really reflected 267 267 // like a mirror. (#5910) 268 function isInDoc( el, doc ) 269 { 270 var html = doc.getBody().getParent(); 271 while ( el ) 272 { 273 if ( el.equals( html ) ) 274 return true; 275 el = el.getParent(); 276 } 277 return false; 278 } 268 279 function dirChangeNotifier( org ) 269 280 { 270 281 var isAttribute = org == elementProto.setAttribute, … … 275 286 { 276 287 if ( !this.getDocument().equals( CKEDITOR.document ) ) 277 288 { 278 var orgDir , dir;279 if ( name == ( isAttribute || isRemoveAttribute ? 'dir' : 'direction' ) ||280 name == 'style' && ( isRemoveAttribute || dirStyleRegexp.test( val ) ) ) 289 var orgDir; 290 if ( ( name == ( isAttribute || isRemoveAttribute ? 'dir' : 'direction' ) || 291 name == 'style' && ( isRemoveAttribute || dirStyleRegexp.test( val ) ) ) && isInDoc( this, this.getDocument() ) ) 281 292 { 282 293 orgDir = this.getDirection( 1 ); 283 294 var retval = org.apply( this, arguments );