Open Bug 589487 Opened 14 years ago Updated 6 months ago

js files in toolkit should compute the autocomplete state with " = input.autocomplete || form.autocomplete;"

Categories

(Toolkit :: Form Manager, defect, P3)

defect

Tracking

()

REOPENED

People

(Reporter: mounir, Unassigned)

References

Details

With bug 557628, input.autocomplete / input.GetAutocomplete will return the autocompletion state. Toolkit should not compute it but use this methods instead.
Can you describe what you mean here? Compute what?
For example, in toolkit/components/satchel/src/formSubmitListener.js, there is some code checking that autocomplete isn't disabled for the form then checking that autocomplete isn't disabled for the element using .getAttribute('autocomplete').

When bug 557628 will be fixed, input.autocomplete should return 'on' or 'off' so you will not have to check for the form, the default value, etc. I guess these checks are done in very different files in toolkit/ considering the results from a `grep -R -e "autocomplete" toolkit/`.
bug 557628 has changed. You can't get the autocomplete state with input.autocomplete. However, you can use:
autocomplete = input.autocomplete || form.autocomplete

input.autocomplete returns "on", "off" or "" (if not specified or unknown value) and form.autocomplete return "on" or "off".
So, the result will always be "on" or "off" which should be convenient and better than input.getAttribute("autocomplete").toLowerCase() == "off" and such...
Summary: Toolkit should not compute autocompletion state but use autocomplete IDL attribute → js files in toolkit should compute the autocomplete state with " = input.autocomplete || form.autocomplete;"
Per policy at https://wiki.mozilla.org/Bug_Triage/Projects/Bug_Handling/Bug_Husbandry#Inactive_Bugs. If this bug is not an enhancement request or a bug not present in a supported release of Firefox, then it may be reopened.
Status: NEW → RESOLVED
Closed: 6 years ago
Resolution: --- → INACTIVE
Status: RESOLVED → REOPENED
Component: Autocomplete → Form Manager
Priority: -- → P3
Resolution: INACTIVE → ---
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.