Revert to old selection behavior (fixes #52365)
This commit is contained in:
parent
dd7601fdd9
commit
c205df5c77
1 changed files with 4 additions and 2 deletions
|
@ -561,7 +561,7 @@ class InputBox extends QuickInput implements IInputBox {
|
|||
|
||||
private _value = '';
|
||||
private _valueSelection: Readonly<[number, number]>;
|
||||
private valueSelectionUpdated = true;
|
||||
private valueSelectionUpdated = false;
|
||||
private _placeholder: string;
|
||||
private _password = false;
|
||||
private _prompt: string;
|
||||
|
@ -662,7 +662,9 @@ class InputBox extends QuickInput implements IInputBox {
|
|||
}
|
||||
if (this.valueSelectionUpdated) {
|
||||
this.valueSelectionUpdated = false;
|
||||
this.ui.inputBox.select(this._valueSelection && { start: this._valueSelection[0], end: this._valueSelection[1] });
|
||||
this.ui.inputBox.select(this._valueSelection ?
|
||||
{ start: this._valueSelection[0], end: this._valueSelection[1] } :
|
||||
{ start: this.ui.inputBox.value.length, end: this.ui.inputBox.value.length });
|
||||
}
|
||||
if (this.ui.inputBox.placeholder !== (this.placeholder || '')) {
|
||||
this.ui.inputBox.placeholder = (this.placeholder || '');
|
||||
|
|
Loading…
Reference in a new issue