JasonWoof Got questions, comments, patches, etc.? Contact Jason Woofenden
vanilla ckeditor-3.1
[ckeditor.git] / _source / plugins / undo / plugin.js
index fcdd2a4..4909cad 100644 (file)
@@ -1,5 +1,5 @@
 /*\r
-Copyright (c) 2003-2009, CKSource - Frederico Knabben. All rights reserved.\r
+Copyright (c) 2003-2010, CKSource - Frederico Knabben. All rights reserved.\r
 For licensing, see LICENSE.html or http://ckeditor.com/license\r
 */\r
 \r
@@ -242,6 +242,9 @@ For licensing, see LICENSE.html or http://ckeditor.com/license
 \r
                                                if ( beforeTypeImage.contents != currentSnapshot )\r
                                                {\r
+                                                       // It's safe to now indicate typing state.\r
+                                                       this.typing = true;\r
+\r
                                                        // This's a special save, with specified snapshot\r
                                                        // and without auto 'fireChange'.\r
                                                        if ( !this.save( false, beforeTypeImage, false ) )\r
@@ -263,9 +266,6 @@ For licensing, see LICENSE.html or http://ckeditor.com/license
 \r
                        this.lastKeystroke = keystroke;\r
 \r
-                       // Ignore modifier keys. (#4673)\r
-                       if( isModifierKey )\r
-                               return;\r
                        // Create undo snap after typed too much (over 25 times).\r
                        if ( isEditingKey )\r
                        {\r
@@ -274,7 +274,7 @@ For licensing, see LICENSE.html or http://ckeditor.com/license
 \r
                                if ( this.modifiersCount > 25 )\r
                                {\r
-                                       this.save();\r
+                                       this.save( false, null, false );\r
                                        this.modifiersCount = 1;\r
                                }\r
                        }\r
@@ -285,12 +285,11 @@ For licensing, see LICENSE.html or http://ckeditor.com/license
 \r
                                if ( this.typesCount > 25 )\r
                                {\r
-                                       this.save();\r
+                                       this.save( false, null, false );\r
                                        this.typesCount = 1;\r
                                }\r
                        }\r
 \r
-                       this.typing = true;\r
                },\r
 \r
                reset : function()      // Reset the undo stack.\r