Bug 394349 - use textbox.editor.transactionManager.clear() instead of textbox.editor.enableUndo(true/false) p=Ryan Jones <sciguyryan@gmail.com> r=gavin
authorasqueella@gmail.com
Tue, 02 Oct 2007 20:35:37 -0700
changeset 6588 e4211d5516e6f15196e20eb107ec6991e0366cc4
parent 6587 59a3eabee8abcf151d2e9f97c47bbf651d649994
child 6589 d6540ae666a1e5aa6f2c43d25f796e139373d833
push idunknown
push userunknown
push dateunknown
reviewersgavin
bugs394349
milestone1.9a9pre
Bug 394349 - use textbox.editor.transactionManager.clear() instead of textbox.editor.enableUndo(true/false) p=Ryan Jones <sciguyryan@gmail.com> r=gavin
browser/modules/Sanitizer.jsm
--- a/browser/modules/Sanitizer.jsm
+++ b/browser/modules/Sanitizer.jsm
@@ -152,18 +152,17 @@ Sanitizer.prototype = {
         //Clear undo history of all searchBars
         var windowManager = Components.classes['@mozilla.org/appshell/window-mediator;1'].getService();
         var windowManagerInterface = windowManager.QueryInterface(Components.interfaces.nsIWindowMediator);
         var windows = windowManagerInterface.getEnumerator("navigator:browser");
         while (windows.hasMoreElements()) {
           var searchBar = windows.getNext().document.getElementById("searchbar");
           if (searchBar) {
             searchBar.value = "";
-            searchBar.textbox.editor.enableUndo(false);
-            searchBar.textbox.editor.enableUndo(true);
+            searchBar.textbox.editor.transactionManager.clear();
           }
         }
 
         var formHistory = Components.classes["@mozilla.org/satchel/form-history;1"]
                                     .getService(Components.interfaces.nsIFormHistory2);
         formHistory.removeAllEntries();
       },