зеркало из https://github.com/mozilla/pjs.git
Fix some problems related to dynamic enabling/disabling of form autocomplete: make autocomplete ignore all key navigation if the input is disabled, also, instead of trying to keep autocomplete state in sync on every browser instance, just set the disabled state on the global form fill controller. Bug 249610, r=blake.
This commit is contained in:
Родитель
abf0ddac41
Коммит
1a5f1373ef
|
@ -809,12 +809,6 @@
|
|||
b.setAttribute("tooltip", this.getAttribute("contenttooltip"));
|
||||
b.setAttribute("autocompletepopup", this.getAttribute("autocompletepopup"));
|
||||
|
||||
// To avoid unnecessary string compares on pageload in <browser>, only set the
|
||||
// autocomplete attribute if autocomplete is actually enabled, so we can
|
||||
// just test with |hasAttribute| in <browser>'s load handler.
|
||||
if (this.getAttribute("autocompleteenabled") == "true")
|
||||
b.setAttribute("autocompleteenabled", "true");
|
||||
|
||||
this.mPanelContainer.appendChild(b);
|
||||
|
||||
b.addEventListener("DOMTitleChanged", this.onTitleChanged, false);
|
||||
|
@ -1268,9 +1262,6 @@
|
|||
var browsers = this.mPanelContainer.childNodes;
|
||||
for (var i = 0; i < browsers.length; ++i) {
|
||||
var cb = browsers[i];
|
||||
// We can do stuff like this here because we aren't called on every
|
||||
// page load, like <browser>'s |attachFormFill| method is.
|
||||
cb.setAttribute("autocompleteenabled", "true");
|
||||
cb.attachFormFill();
|
||||
}
|
||||
]]></body>
|
||||
|
@ -1281,7 +1272,6 @@
|
|||
var browsers = this.mPanelContainer.childNodes;
|
||||
for (var i = 0; i < browsers.length; ++i) {
|
||||
var cb = browsers[i];
|
||||
cb.removeAttribute("autocompleteenabled");
|
||||
cb.detachFormFill();
|
||||
}
|
||||
]]></body>
|
||||
|
|
Загрузка…
Ссылка в новой задаче