Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Display a caps lock indicator on password input #1018

Merged
merged 2 commits into from
Apr 26, 2021

Conversation

obany
Copy link
Contributor

@obany obany commented Apr 23, 2021

Description of change

Displays a caps lock indicator on password input to stop people incorrectly typing passwords in the wrong case.

image

Links to any relevant issues

Fixes #996 #1021

Type of change

  • Enhancement (a non-breaking change which adds functionality)

How the change has been tested

Tested on windows

Change checklist

  • I have followed the contribution guidelines for this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes

@obany obany requested a review from cvarley100 as a code owner April 23, 2021 15:26

const handleInput = (e) => {
value = e.target.value
}

const onKeyDown = (e) => {
Copy link
Member

Choose a reason for hiding this comment

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

I'm not sure if this is specific to macOS, but for some reason keydown is not fired when caps lock is turned off (instead I think keyup is fired). As a result, the caps lock warning shows until the next character is pressed, which might be a minor UX issue (not a huge deal though)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I have added the handler on keyup as well, both can get the modified state without a problem, so that should catch both cases.

@rajivshah3 rajivshah3 merged commit 435b708 into develop Apr 26, 2021
@rajivshah3 rajivshah3 deleted the feat/caps-lock-indicator branch April 26, 2021 07:16
This was referenced Apr 26, 2021
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.

[UX] Capslock indicator for password creation during setup (next input right after all-uppercase seed)
2 participants