Monorepo for Tangled โ€” https://tangled.org

appview/pages (knot/spindle): fix firefox autofilling "add member" modal with autocomplete=off #750

merged
opened by evan.jarrett.net targeting master from evan.jarrett.net/core: modal-input-prefill

Summary#

Fixes Firefox-specific bug where "add member" modal input is prefilled with registration hostname for knots and spindles. (doesn't happen in chromium)

Issue:

  1. User enters hostname in registration form
  2. Registration succeeds and triggers HxRefresh (full page reload)
  3. Firefox aggressively restores form state after refresh
  4. User then clicks "add member" on the newly created knot/spindle
  5. Firefox incorrectly auto-fills the modal member input with the registration form value

Solution#

Add autocomplete="off" to prevent browser from auto-filling or restoring values in member input fields. Since this is not a login field, and users should be adding new members each time there is no reason to let the browser autofill.

Changes#

  • Added autocomplete="off" to member input in appview/pages/templates/knots/fragments/addMemberModal.html
  • Added autocomplete="off" to member input in appview/pages/templates/spindles/fragments/addMemberModal.html
  • Added autocapitalize="none" and autocorrect="off" to knots modal for consistency with spindles
0
by evan.jarrett.net 1 comment
expand 1 commit
appview/pages: fix firefox autofilling addMemberModal with autocomplete=off

appreciate the detailed writeup! thanks for investigating and fixing this.

pull request successfully merged
sign up or login to add to the discussion
Labels

None yet.

assignee

None yet.

Participants 2
AT URI
at://did:plc:pddp4xt5lgnv2qsegbzzs4xg/sh.tangled.repo.pull/3m4rs352mmo22