Skip to content

fix: 🐛 Fix show-password toggle in PasswordField#56

Open
wapec wants to merge 2 commits into
Euro-Office:mainfrom
wapec:fix/password-field-type-typo
Open

fix: 🐛 Fix show-password toggle in PasswordField#56
wapec wants to merge 2 commits into
Euro-Office:mainfrom
wapec:fix/password-field-type-typo

Conversation

@wapec
Copy link
Copy Markdown

@wapec wapec commented May 5, 2026

  • Input type was 'type' instead of 'text', making the reveal non-functional
  • Toggle button was a non-interactive ; replaced with for keyboard accessibility with aria-pressed and aria-label
  • aria-label uses i18n translations (textShowPassword / textHidePassword)
  • Added CSS reset for the new button element to preserve existing layout

Test plan

Open a file in the mobile editor.
Navigate: Settings → Protection → Protect Document → Set Password.

Show / hide toggle — visibility

  • iOS: eye icon is visible on both Password and Verify fields
  • Android: eye icon is visible on both Password and Verify fields
  • (Regression) Before this PR the icon was missing on iOS

Show / hide toggle — behaviour

  • Default state: input is masked (••••••)
  • Type a password (e.g. test123456) — still masked
  • Tap the eye icon → password becomes plain text
  • (Regression) Before this PR tapping the icon did nothing
    (input had type="type", an invalid value)
  • Icon swaps to “hide” (crossed-out eye) when text is shown
  • Tap again → masked again, icon returns to “show”
  • Password and Verify fields toggle independently

Layout

  • iOS: eye icon is right-aligned, vertically centred
  • iOS: tap target is at least 24×24 px
  • Android: layout unchanged vs. previous behaviour

Submit flow (sanity)

  • Empty fields → Save disabled
  • Matching passwords → Save enabled
  • Mismatched passwords → validation error shown

Tested on

  • iOS Safari — screenshot attached
  • Android Chrome — screenshot attached

Screenshots

iOS Android
ios android

@moodyjmz moodyjmz self-assigned this May 15, 2026
@moodyjmz
Copy link
Copy Markdown
Member

I like the removal of the more convoluted logic for the icon - when out of draft? @wapec

@wapec wapec marked this pull request as ready for review May 17, 2026 14:23
wapec added 2 commits May 17, 2026 16:49
- Fix input type typo ('type' → 'text')
- Show toggle on iOS with platform-specific icons

Signed-off-by: Bohdan Baranov <wapec@icloud.com>
- Add flex layout for toggle alignment
- Set minimum icon dimensions

Signed-off-by: Bohdan Baranov <wapec@icloud.com>
@wapec wapec force-pushed the fix/password-field-type-typo branch from f684d15 to fcf7b53 Compare May 17, 2026 14:52
@wapec
Copy link
Copy Markdown
Author

wapec commented May 17, 2026

thanks @moodyjmz . I have just cleaned up the commits and split into two changelog entries. PR is ready for review

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants