Ticket #8321: 8321_3.patch
File 8321_3.patch, 1.9 KB (added by , 12 years ago) |
---|
-
_source/core/dom/element.js
719 719 return false; 720 720 }, 721 721 722 isEditable : function() 722 /** 723 * Decide whether one element is able to receive cursor. 724 * @param {Boolean} [textCursor=true] Only consider element that could receive text child. 725 */ 726 isEditable : function( textCursor ) 723 727 { 724 if ( this.isReadOnly() || !this.isVisible() )725 return false;726 727 // Get the element name.728 728 var name = this.getName(); 729 729 730 // Get the element DTD (defaults to span for unknown elements). 731 var dtd = !CKEDITOR.dtd.$nonEditable[ name ] 732 && ( CKEDITOR.dtd[ name ] || CKEDITOR.dtd.span ); 730 if ( this.isReadOnly() 731 || this.getComputedStyle( 'display' ) == 'none' 732 || this.getComputedStyle( 'visibility' ) == 'hidden' 733 || CKEDITOR.dtd.$nonEditable[ name ] ) 734 { 735 return false; 736 } 733 737 734 // In the DTD # == text node. 735 return ( dtd && dtd['#'] ); 738 if ( textCursor !== false ) 739 { 740 // Get the element DTD (defaults to span for unknown elements). 741 var dtd = CKEDITOR.dtd[ name ] || CKEDITOR.dtd.span; 742 // In the DTD # == text node. 743 return ( dtd && dtd[ '#'] ); 744 } 745 746 return true; 736 747 }, 737 748 738 749 isIdentical : function( otherElement ) -
_source/core/dom/range.js
1925 1925 var next; 1926 1926 1927 1927 if ( node.type == CKEDITOR.NODE_ELEMENT 1928 && !node.isReadOnly() 1929 && node.isVisible() 1928 && node.isEditable( false ) 1930 1929 && !CKEDITOR.dtd.$nonEditable[ node.getName() ] ) 1931 1930 { 1932 1931 next = node[ isMoveToEnd ? 'getLast' : 'getFirst' ]( nonWhitespaceOrBookmarkEval );