Skip to content
This repository has been archived by the owner on Apr 19, 2024. It is now read-only.

Added customisable hide character for password inputs. #431

Merged

Conversation

SirRegion
Copy link
Contributor

Hi @AlecAivazis and @mislav!

I had some free time so I tried my hand on implementing #386.

Changing the hide character of the password field works as expected. However, using an empty rune just results in the characters not getting hidden at all.

The best workaround for this is setting the custom hide character to an zero width space. This results in the behaviour required by the original poster.

I included an example for the password input, but I did not write a test for the behaviour. I also noticed that the existing password tests don't actually validate that the input is hidden, just that is is stored correctly. I'm sadly incapable of fixing those two issues.

Includes example, but is missing a test

mend
@AlecAivazis
Copy link
Owner

Thanks for putting this together @SirRegion! Mind putting a little note in the docs about the zero space width?

@AlecAivazis
Copy link
Owner

AlecAivazis commented Sep 12, 2022

@SirRegion there is now a merge conflct. I'd be happy to merge this once its ready (I can add the documentation after)

@AlecAivazis AlecAivazis merged commit d889203 into AlecAivazis:master Sep 22, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants