зеркало из https://github.com/mozilla/pjs.git
This patch allows the user to disable form history without disabling
search suggestions. bug=338064 r=gavin sr/branch=mconnor
This commit is contained in:
Родитель
f2bc427afd
Коммит
91b6df5074
|
@ -1264,14 +1264,6 @@ FormFillPrefListener.prototype =
|
|||
}
|
||||
var formController = Components.classes["@mozilla.org/satchel/form-fill-controller;1"].getService(Components.interfaces.nsIAutoCompleteInput);
|
||||
formController.disableAutoComplete = !gFormFillEnabled;
|
||||
|
||||
var searchBar = document.getElementsByTagName("searchbar");
|
||||
for (var i=0; i<searchBar.length;i++) {
|
||||
if (gFormFillEnabled)
|
||||
searchBar[i].removeAttribute("disableautocomplete");
|
||||
else
|
||||
searchBar[i].setAttribute("disableautocomplete", "true");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -409,7 +409,7 @@
|
|||
textValue = "";
|
||||
|
||||
// Save the current value in the form history
|
||||
if (textValue && !textBox.hasAttribute("disableautocomplete")) {
|
||||
if (textValue) {
|
||||
textBox._formHistSvc.addEntry(textBox.getAttribute("autocompletesearchparam"),
|
||||
textValue);
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче