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: value option is selecting text by default resulting in deleted content #52365

Closed
jamarw opened this issue Jun 19, 2018 · 4 comments
Assignees
Labels
*as-designed Described behavior is as designed quick-pick Quick-pick widget issues

Comments

@jamarw
Copy link

jamarw commented Jun 19, 2018

  • VSCode Version: 1.24.1, Insiders: 1.25.0-insider
  • OS Version: Windows 10 1803

Steps to Reproduce:
Sample code
let disposable = vscode.commands.registerCommand("extension.sayHello", () => {
vscode.window.showInputBox({
value: "https://",
});
});

  1. Run the code above sample

Result
Input box opens and https:// is selected automatically. If a user begins to type it will delete the placeholder value. This is similar to an old resolved issue.

Does this issue occur when all extensions are disabled?: Yes

Thanks and please let me know if you need any additional information.

@vscodebot vscodebot bot added editor editor-core Editor basic functionality labels Jun 19, 2018
@chrmarti chrmarti added quick-pick Quick-pick widget issues and removed editor editor-core Editor basic functionality labels Jun 20, 2018
@chrmarti
Copy link
Contributor

You could use the valueSelection option to set the cursor to the end of the initial value.

@chrmarti chrmarti self-assigned this Jun 20, 2018
@jamarw
Copy link
Author

jamarw commented Jun 20, 2018

@chrmarti , thanks for the suggestion.

@chrmarti chrmarti added this to the June 2018 milestone Jun 21, 2018
@chrmarti
Copy link
Contributor

Reverting to the old behavior. This wasn't an intentional change.

@chrmarti
Copy link
Contributor

Actually, the documentation was always that When undefined the whole word will be selected .... I'll revert this change back to what is documented with #52906.

@chrmarti chrmarti added the *as-designed Described behavior is as designed label Jun 27, 2018
@chrmarti chrmarti removed this from the June 2018 milestone Jun 27, 2018
@vscodebot vscodebot bot locked and limited conversation to collaborators Aug 5, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
*as-designed Described behavior is as designed quick-pick Quick-pick widget issues
Projects
None yet
Development

No branches or pull requests

2 participants