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

Bug Fix: tab on MaskedInput for GeneratedItems it was clearing the value #12409

Merged
merged 6 commits into from Aug 24, 2021

Conversation

Monkeychip
Copy link
Contributor

Only in the case where the MaskedInput component was being called via GeneratedItem (e.g. auth methods with sensitive field inputs) the data was cleared on tab.

This is because the onKeyUp function was not being handled in the MaskedInput component but instead in the FormField component. I moved this function down a level into the MaskedInput. I tested all the other use cases of MaskedInput and things were working as expected.

To replicate:

  • On userpass auth method, create a user and tab on the password field. Before this would clear the data, now it does not.

@Monkeychip Monkeychip added bug Used to indicate a potential bug ui labels Aug 23, 2021
@Monkeychip Monkeychip added this to the 1.8.3 milestone Aug 23, 2021
@vercel vercel bot temporarily deployed to Preview – vault August 23, 2021 21:34 Inactive
@vercel vercel bot temporarily deployed to Preview – vault August 23, 2021 21:37 Inactive
@vercel vercel bot temporarily deployed to Preview – vault August 23, 2021 21:42 Inactive
Copy link
Contributor

@hashishaw hashishaw left a comment

Choose a reason for hiding this comment

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

Nice work! And thanks for adding tests. One small docs change request

@@ -18,7 +18,7 @@ import layout from '../templates/components/form-field';
* ```
*
* @param [onChange=null] {Func} - Called whenever a value on the model changes via the component.
* @param [onKeyUp=null] {Func} - Called whenever cp-validations is being used and you need to validation on keyup. Send name of field and value of input.
* @param [onKeyUp=null] {Func} - A function passed through into MaskedInput to handle validation.
Copy link
Contributor

Choose a reason for hiding this comment

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

This method is also called on the regular input, should that be called out here?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Good point. I'll add that.

@vercel vercel bot temporarily deployed to Preview – vault August 23, 2021 21:45 Inactive
@Monkeychip Monkeychip merged commit 5f4f4b6 into main Aug 24, 2021
@Monkeychip Monkeychip deleted the ui/bug-fix-auth-tab-clears-inputs branch August 24, 2021 15:00
Monkeychip added a commit that referenced this pull request Aug 24, 2021
…lue (#12409)

* fix tab issue

* add test coverage

* changelog

* update documentation

* remove meep:

* documentation
Monkeychip added a commit that referenced this pull request Aug 24, 2021
…lue (#12409) (#12416)

* fix tab issue

* add test coverage

* changelog

* update documentation

* remove meep:

* documentation
jartek pushed a commit to jartek/vault that referenced this pull request Sep 11, 2021
…lue (hashicorp#12409)

* fix tab issue

* add test coverage

* changelog

* update documentation

* remove meep:

* documentation
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Used to indicate a potential bug ui
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants