зеркало из https://github.com/mozilla/gecko-dev.git
Bug 617069 - Contacts autocomplete is broken for id and className matches [r=vingtetun]
This commit is contained in:
Родитель
99df1055ee
Коммит
cccfabd572
|
@ -81,15 +81,15 @@ FormAutoComplete.prototype = {
|
||||||
// If we have an input field with the desired html5 type, take it!
|
// If we have an input field with the desired html5 type, take it!
|
||||||
if (aField && "type" in aField) {
|
if (aField && "type" in aField) {
|
||||||
let type = aField.type;
|
let type = aField.type;
|
||||||
if (this.contactTypes[type] != null)
|
if (type && type in this.contactTypes)
|
||||||
return type;
|
return type;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Grab properties to check for contact inputs
|
// Grab properties to check for contact inputs
|
||||||
let props = [aName];
|
let props = [aName];
|
||||||
if (aField) {
|
if (aField) {
|
||||||
let specialProps = [aField["className"], aField["id"], aField["rel"]];
|
let specialProps = [aField["className"], aField["id"]];
|
||||||
props = props.concat(props.filter(function(aValue) {
|
props = props.concat(specialProps.filter(function(aValue) {
|
||||||
return aValue;
|
return aValue;
|
||||||
}));
|
}));
|
||||||
}
|
}
|
||||||
|
@ -139,7 +139,7 @@ FormAutoComplete.prototype = {
|
||||||
|
|
||||||
autoCompleteSearch: function autoCompleteSearch(aName, aQuery, aField, aPrev) {
|
autoCompleteSearch: function autoCompleteSearch(aName, aQuery, aField, aPrev) {
|
||||||
if (!Services.prefs.getBoolPref("browser.formfill.enable"))
|
if (!Services.prefs.getBoolPref("browser.formfill.enable"))
|
||||||
return;
|
return null;
|
||||||
|
|
||||||
LOG("autocomplete search", Array.slice(arguments));
|
LOG("autocomplete search", Array.slice(arguments));
|
||||||
let result = Cc["@mozilla.org/autocomplete/simple-result;1"].createInstance(Ci.nsIAutoCompleteSimpleResult);
|
let result = Cc["@mozilla.org/autocomplete/simple-result;1"].createInstance(Ci.nsIAutoCompleteSimpleResult);
|
||||||
|
|
Загрузка…
Ссылка в новой задаче