Ticket #5162: 5162_2.patch
File 5162_2.patch, 1.3 KB (added by , 14 years ago) |
---|
-
_source/plugins/undo/plugin.js
120 120 // Gets a snapshot image which represent the current document status. 121 121 function Image( editor ) 122 122 { 123 var selection = editor.getSelection(); 123 var selection = editor.getSelection(), 124 contents = this.contents = editor.getSnapshot(); 124 125 125 this.contents = editor.getSnapshot();126 126 this.bookmarks = selection && selection.createBookmarks2( true ); 127 127 128 128 // In IE, we need to remove the expando attributes. 129 if ( CKEDITOR.env.ie )130 this.contents = this.contents.replace( /\s+_cke_expando=".*?"/g, '' );129 if ( CKEDITOR.env.ie && contents ) 130 this.contents = contents.replace( /\s+_cke_expando=".*?"/g, '' ); 131 131 } 132 132 133 133 // Attributes that browser may changing them when setting via innerHTML. … … 351 351 if ( !image ) 352 352 image = new Image( this.editor ); 353 353 354 // Do nothing if it was not possible to retrieve an image. 355 if ( image.contents === false ) 356 return; 357 354 358 // Check if this is a duplicate. In such case, do nothing. 355 359 if ( this.currentImage && image.equals( this.currentImage, onContentOnly ) ) 356 360 return false;