Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Fixed bug where hasUndo() would return wrong answer

  • Loading branch information...
commit 100ea8355bfa1b4e4eb669aa08879fec36bce277 1 parent 6d9bd75
@alecpl alecpl authored
View
1  changelog.txt
@@ -2,6 +2,7 @@ Version 3.4.3 (2011-??-??)
Fixed bug where table size inputs were to small for values with size units.
Fixed bug where table cell/row size input values were not validated.
Fixed bug where menu item line-height would be set to wrong value by external styles.
+ Fixed bug where hasUndo() would return wrong answer.
Version 3.4.2 (2011-04-07)
Added new 'paste_text_sticky_default' option to paste plugin, enables you to set the default state for paste as plain text.
Added new autoresize_bottom_margin option to autoresize plugin that enables you to add an extra margin at the bottom. Patch contributed by Andrew Ozz.
View
8 jscripts/tiny_mce/classes/Editor.js
@@ -3172,8 +3172,7 @@
if (!t.undoManager.typing) {
t.undoManager.beforeChange();
- t.undoManager.typing = true;
- t.undoManager.add();
+ addUndo();
}
// Select next word when ctrl key is used in combo with delete
@@ -3222,8 +3221,7 @@
// If key isn't shift,ctrl,alt,capslock,metakey
if ((keyCode < 16 || keyCode > 20) && keyCode != 224 && keyCode != 91 && !t.undoManager.typing) {
t.undoManager.beforeChange();
- t.undoManager.add();
- t.undoManager.typing = true;
+ addUndo();
}
});
@@ -3232,7 +3230,7 @@
addUndo();
});
}
-
+
// Bug fix for FireFox keeping styles from end of selection instead of start.
if (tinymce.isGecko) {
function getAttributeApplyFunction() {
View
6 jscripts/tiny_mce/themes/advanced/editor_template_src.js
@@ -936,10 +936,10 @@
},
_updateUndoStatus : function(ed) {
- var cm = ed.controlManager;
+ var cm = ed.controlManager, um = ed.undoManager;
- cm.setDisabled('undo', !ed.undoManager.hasUndo() && !ed.typing);
- cm.setDisabled('redo', !ed.undoManager.hasRedo());
+ cm.setDisabled('undo', !um.hasUndo() && !um.typing);
+ cm.setDisabled('redo', !um.hasRedo());
},
_nodeChanged : function(ed, cm, n, co, ob) {
Please sign in to comment.
Something went wrong with that request. Please try again.