Ticket #8246: 8246.patch

File 8246.patch, 916 bytes (added by Garry Yao, 13 years ago)
  • _source/core/dom/node.js

     
    673673                 */
    674674                isReadOnly : function()
    675675                {
    676                         var current = this;
    677                         while( current )
    678                         {
    679                                 if ( current.type == CKEDITOR.NODE_ELEMENT )
    680                                 {
    681                                         if ( current.is( 'body' ) || !!current.data( 'cke-editable' ) )
    682                                                 break;
     676                        var element = this.type == CKEDITOR.NODE_TEXT
     677                                || this.type == CKEDITOR.NODE_COMMENT ?
     678                                this.getParent() : this;
    683679
    684                                         if ( current.getAttribute( 'contentEditable' ) == 'false' )
    685                                                 return current;
    686                                         else if ( current.getAttribute( 'contentEditable' ) == 'true' )
    687                                                 break;
    688                                 }
    689                                 current = current.getParent();
    690                         }
    691 
    692                         return false;
    693                 }
    694         }
     680                        return element && !element.$.isContentEditable;
     681                }
     682        }
    695683);
© 2003 – 2022, CKSource sp. z o.o. sp.k. All rights reserved. | Terms of use | Privacy policy