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

plugin: reset validateInput on subsequent calls #10396

Merged
merged 1 commit into from
Nov 10, 2021

Conversation

vince-fugnitto
Copy link
Member

What it does

Fixes: #10393

The pull-request fixes an issue where the validateInput handler is not reset on subsequent showInput calls leading to the input being incorrectly validated. The fix ensures that if a showInput omits validateInput that it will reset the cached handler.

How to test

  1. include the following show-input
  2. confirm that the steps from validateInput does not get cleared between window.showInputBox calls #10393 work well - the validateInput should not be preserved on subsequent showInput calls

Review checklist

Reminder for reviewers

Signed-off-by: vince-fugnitto [email protected]

@vince-fugnitto vince-fugnitto added the vscode issues related to VSCode compatibility label Nov 8, 2021
@vince-fugnitto vince-fugnitto self-assigned this Nov 8, 2021
Copy link
Member

@msujew msujew left a comment

Choose a reason for hiding this comment

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

I can confirm that the issue exists on master and is addressed by these changes nicely 👍

The commit resolves an issue when calling multiple `showInput` calls
when providing and omitting `validateInput`. Previously, since the
`validateInput` handler was cached, if a `showInput` call did not
provide validation it would it a previous handler incorrectly.

Signed-off-by: vince-fugnitto <[email protected]>
@vince-fugnitto
Copy link
Member Author

@msujew I cleaned up the pull-request further including fixing a similar potential issue with showInputBox and typings, any objections to me merging?

Copy link
Member

@msujew msujew left a comment

Choose a reason for hiding this comment

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

Looks great! Feel free to merge 👍

@vince-fugnitto vince-fugnitto merged commit 1b37d75 into master Nov 10, 2021
@vince-fugnitto vince-fugnitto deleted the vf/validate-input branch November 10, 2021 14:50
@github-actions github-actions bot added this to the 1.20.0 milestone Nov 10, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
vscode issues related to VSCode compatibility
Projects
None yet
Development

Successfully merging this pull request may close these issues.

validateInput does not get cleared between window.showInputBox calls
2 participants