Bug 350675: fix the searchbar's value setter to behave correctly (gray text was being removed incorrectly, setting to a non-empty value didn't remove the gray styling), r=mano
authorgavin@gavinsharp.com
Tue, 02 Oct 2007 20:35:34 -0700
changeset 6584 7262ca7e46859335c21661aec5fcaaba07283d81
parent 6583 61615ac809dcd82e3531d50dd491875bd7b9d6fd
child 6585 8cb4047f92358029e1415010a431478f0e785a65
push idunknown
push userunknown
push dateunknown
reviewersmano
bugs350675
milestone1.9a9pre
Bug 350675: fix the searchbar's value setter to behave correctly (gray text was being removed incorrectly, setting to a non-empty value didn't remove the gray styling), r=mano
browser/modules/Sanitizer.jsm
--- a/browser/modules/Sanitizer.jsm
+++ b/browser/modules/Sanitizer.jsm
@@ -153,17 +153,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.textbox.value = "";
+            searchBar.value = "";
             searchBar.textbox.editor.enableUndo(false);
             searchBar.textbox.editor.enableUndo(true);
           }
         }
 
         var formHistory = Components.classes["@mozilla.org/satchel/form-history;1"]
                                     .getService(Components.interfaces.nsIFormHistory2);
         formHistory.removeAllEntries();