Skip to content

Commit

Permalink
add autocomplete="postal-code" to zip field (#36)
Browse files Browse the repository at this point in the history
I'm led to believe that this is all that's required to get modern
browsers to offer suggested completions for zip codes.

HOWEVER, I can't get it to work locally in Safari.

When I disabled 1password in Chrome and added an address to the address
book I did get it to do this:
![Screenshot 2023-10-02 at 5 29 55
PM](https://github.com/rewiringamerica/embed.rewiringamerica.org/assets/39635/98d8c339-9621-48f0-a621-bfe5e9e0070c)

It doesn't do this without the `autocomplete` attribute so I think
that's progress?

I have a theory that Safari will work when it's not on localhost. Will
check the preview build.

Closes https://app.asana.com/0/0/1205636787130044/f
  • Loading branch information
RandomEtc authored Oct 3, 2023
1 parent 6b26e93 commit 6a392f7
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/calculator-form.ts
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,7 @@ export const formTemplate = (
maxlength="5"
inputmode="numeric"
pattern="[0-9]{5}"
autocomplete="postal-code"
/>
</div>
<div>
Expand Down

1 comment on commit 6a392f7

@vercel
Copy link

@vercel vercel bot commented on 6a392f7 Oct 3, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.