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

showInputBox overwrites input with initial value when validation fails #9376

Closed
siegebell opened this issue Jul 16, 2016 · 1 comment
Closed
Assignees
Labels
bug Issue identified by VS Code Team member as probable bug verified Verification succeeded
Milestone

Comments

@siegebell
Copy link

  • VSCode Version: 1.3.0, 1.4.0 commit 4d0b2f5
  • OS Version: Windows 8.1 64bit

Steps to Reproduce:

export function activate(activationContext: vscode.ExtensionContext) {
  vscode.window.showInputBox({
    value: 'initial-value',
    validateInput: (text: string) => text=='' ? '' : 'input must be empty'
  });
}
  1. run the above extension
  2. type a character into the input box
  3. this will trigger validation failure
  4. bug: the typed text will be replaced with the initial value
  5. subsequent characters will not be replaced by the initial value
  6. clear the text (satisfying validation and removing the error)
  7. go to step 2 to repeat.
@jrieken jrieken added the bug Issue identified by VS Code Team member as probable bug label Jul 20, 2016
@jrieken jrieken added this to the July 2016 milestone Jul 20, 2016
@jrieken
Copy link
Member

jrieken commented Jul 21, 2016

Thanks for the repo and the detailed steps

@sandy081 sandy081 added the verified Verification succeeded label Jul 28, 2016
@vscodebot vscodebot bot locked and limited conversation to collaborators Nov 18, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Issue identified by VS Code Team member as probable bug verified Verification succeeded
Projects
None yet
Development

No branches or pull requests

3 participants