Bug 394349 - use textbox.editor.transactionManager.clear() instead of textbox.editor.enableUndo(true/false) p=Ryan Jones <sciguyryan@gmail.com> r=gavin
--- 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();
},