X-Git-Url: https://jasonwoof.com/gitweb/?a=blobdiff_plain;f=_source%2Fcore%2Fdom%2Felement.js;fp=_source%2Fcore%2Fdom%2Felement.js;h=b2f9bcc44a326243b40f57614f69e5b9360ffa8b;hb=055b6b0792ce7dc53d47af606b367c04b927c2ab;hp=bd425201afd599fe5cc18c100f8c5203a13610b9;hpb=66f4ae0bf0280ed56bf7c0f4ab175424dd1d47a0;p=ckeditor.git diff --git a/_source/core/dom/element.js b/_source/core/dom/element.js index bd42520..b2f9bcc 100644 --- a/_source/core/dom/element.js +++ b/_source/core/dom/element.js @@ -850,8 +850,16 @@ CKEDITOR.tools.extend( CKEDITOR.dom.element.prototype, : function() { - var attributes = this.$.attributes; - return ( attributes.length > 1 || ( attributes.length == 1 && attributes[0].nodeName != '_cke_expando' ) ); + var attrs = this.$.attributes, + attrsNum = attrs.length; + + // The _moz_dirty attribute might get into the element after pasting (#5455) + var execludeAttrs = { _cke_expando : 1, _moz_dirty : 1 }; + + return attrsNum > 0 && + ( attrsNum > 2 || + !execludeAttrs[ attrs[0].nodeName ] || + ( attrsNum == 2 && !execludeAttrs[ attrs[1].nodeName ] ) ); }, /** @@ -1162,11 +1170,13 @@ CKEDITOR.tools.extend( CKEDITOR.dom.element.prototype, function() { this.$.style.MozUserSelect = 'none'; + this.on( 'dragstart', function (evt) { evt.data.preventDefault(); } ); } : CKEDITOR.env.webkit ? function() { this.$.style.KhtmlUserSelect = 'none'; + this.on( 'dragstart', function (evt) { evt.data.preventDefault(); } ); } : function()