| 504 | // Never place the carot inside empty node, which will be removed |
| 505 | // during 'innerHTML' retrieving, make the bookmark positon incorrect. (#3453) |
| 506 | while ( startContainer.type == CKEDITOR.NODE_TEXT |
| 507 | && !CKEDITOR.tools.trim( startContainer.getText() ) ) |
| 508 | { |
| 509 | var parent = startContainer.getParent(); |
| 510 | startOffset = CKEDITOR.tools.indexOf( |
| 511 | Array.prototype.slice.call( parent.$.childNodes ), startContainer.$ ); |
| 512 | startContainer = parent; |
| 513 | } |
| 514 | if( !this.collapsed ) |
| 515 | { |
| 516 | while ( endContainer.type == CKEDITOR.NODE_TEXT |
| 517 | && !CKEDITOR.tools.trim( endContainer.getText() ) ) |
| 518 | { |
| 519 | parent = endContainer.getParent(); |
| 520 | endOffset = CKEDITOR.tools.indexOf( |
| 521 | Array.prototype.slice.call( parent.$.childNodes ), endContainer.$ ); |
| 522 | endContainer = parent; |
| 523 | } |
| 524 | } |