Key fields: keep the browser's password UI away, fix the keyboard layout

"Trying to use a different provider on the web app glitches out completely" -
an iPhone photo of the first-run gate with iOS's saved-password sheet laid
over it ("password for proxmox...") and the provider field stuck under the
keyboard.

- The key fields (gate, Settings, provider rows) were type=password with
  autocomplete=off, which iOS/Safari and 1Password/LastPass read as a login.
  They now carry autoComplete="new-password", data-form-type="other",
  data-lpignore="true", autoCorrect/autoCapitalize=off and inputMode=text:
  the mask stays, the password overlay goes. The custom base URL gets
  inputMode=url and the same hints.
- The gate's keyboard handling scrolled to the Continue button instead of the
  field being edited, so with the provider rows open the keyboard covered the
  input and the locked wrapper could not be scrolled to it. The wrapper is
  user-scrollable again, alignment anchors on the focused element (Continue
  is the fallback), and the corner controls hide while the keyboard is up
  rather than landing on the card.

providers-test drives a fake visualViewport (340px, installed before mount)
and pins the three layout contracts plus the hardening attributes. All 16
suites green, contrast clean. Version 0.7.2, SW v94.
This commit is contained in:
Martin Dvořák 2026-10-16 10:12:20 +00:00
commit 84a94581dc
7 changed files with 154 additions and 19 deletions

View file

@ -101,7 +101,10 @@ export function ProvidersSection() {
placeholder={t("providers.baseUrlPlaceholder")}
aria-label={t("providers.baseUrl")}
autoComplete="off"
autoCorrect="off"
spellCheck={false}
inputMode="url"
data-form-type="other"
className="w-full rounded-xl border border-[var(--hairline)] bg-[var(--surface-strong)] px-3 py-2 text-[13px] text-[var(--text)] outline-none placeholder:text-[var(--text-subtle)] focus:border-accent-400"
/>
) : null}
@ -116,8 +119,16 @@ export function ProvidersSection() {
}}
placeholder={saved ? t("providers.keySaved") : provider.keyHint}
aria-label={`${provider.label} ${t("providers.key")}`}
autoComplete="off"
/* See the gate: an API key must not raise the browser's
saved-password UI ("new-password" + the data hints). */
autoComplete="new-password"
autoCorrect="off"
autoCapitalize="off"
spellCheck={false}
inputMode="text"
enterKeyHint="done"
data-form-type="other"
data-lpignore="true"
className="min-w-0 flex-1 rounded-xl border border-[var(--hairline)] bg-[var(--surface-strong)] px-3 py-2 text-[13px] text-[var(--text)] outline-none placeholder:text-[var(--text-subtle)] focus:border-accent-400"
/>
<button