Closed Bug 1519081 Opened 9 months ago Closed 9 months ago

"State" field is displayed even after selecting a Country/Region with no list of state/Province


(Toolkit :: Form Autofill, defect, P1)

66 Branch



Tracking Status
firefox-esr60 --- unaffected
firefox64 --- unaffected
firefox65 --- unaffected
firefox66 --- verified


(Reporter: hani.yacoub, Assigned: MattN)



(Keywords: regression, Whiteboard: [webpayments])


(3 files)

Attached image state field.png

[Affected versions]:
Nightly 66.0a1

[Affected platforms]:
Platforms: Windows 10 x 64, Mac OS X 10.12 and Ubuntu 16.04 x64.

[Steps to reproduce]:

  1. In about:config set the pref dom.payments.request.enabled to "true" and set the pref to "US" or "CA".
  2. Go to "" page and click on "Buy".
  3. In case you have already saved info click on "Add" from shipping address.
  4. Observe that "state" field is displayed in case United states is selected in "Country or Region" field.
  5. From "Country or Region" field select "Gaza Strip".

[Expected result]:
"State" field shouldn't be displayed.

[Actual result]:
"State" field is displayed even after selecting a Country/Region with no list of state/Province

Whiteboard: [webpayments] [triage]
Flags: qe-verify+

Marking as a regression since users could previously type the region.

I'll debug and triage this now.

Blocks: 1474905
Component: WebPayments UI → Form Autofill
Keywords: regression
Product: Firefox → Toolkit
Whiteboard: [webpayments] [triage] → [webpayments]

The problem is likely because this is a region in (Mozilla's list) but not in the data from libaddressinput.

Assignee: nobody → MattN+bmo
Priority: -- → P1
Version: 65 Branch → 66 Branch
Pushed by
Don't fallback to another country in FormAutofillUtils.getFormFormat. r=jaws
Closed: 9 months ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla66

Verified as fixed on Firefox Nightly 66.0a1 (2019-01-14) on Windows 10 x 64, Mac OS X 10.14 and on Ubuntu 16.04 x64.

Is it intended to use 2-char code instead of the long name?

Flags: qe-verify+ → needinfo?(MattN+bmo)

(In reply to Hani Yacoub from comment #6)

Is it intended to use 2-char code instead of the long name?

I'm not sure what you mean? Which field are you talking about? Country/Region field or Province/State field?

Flags: needinfo?(MattN+bmo) → needinfo?(hani.yacoub)

I'm talking about Country/Region field, sorry I forget to mention that.

Flags: needinfo?(hani.yacoub)

Before this fix the long name of the Country/Region was displayed not 2-char code of it.

Flags: needinfo?(MattN+bmo)

If you're talking about what is displayed on the summary page then that change isn't necessarily intentional but I think it's fine though I didn't consult the UI spec.

Flags: needinfo?(MattN+bmo)

I'm talking about "country/region" field in the "Add/Edit shipping address" form.

I attached a screenshot comparing a Nightly build from (2019-01-10) with a build from today.

Flags: needinfo?(MattN+bmo)

That's not great but I also suspect it wasn't from this bug. It's more likely from bug 1509583 though a regression range would be good. Since I assume autofill prefs are fine (they are for me), I don't think this is a huge priority given the current status of web payments.

Flags: needinfo?(MattN+bmo)
You need to log in before you can comment on or make changes to this bug.