Skip to content

Commit 57ddcfd

Browse files
committed
Only update visibilities when visible (microsoft#84125)
1 parent cd39e8e commit 57ddcfd

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

src/vs/workbench/browser/parts/quickinput/quickInput.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -702,11 +702,11 @@ class QuickPick<T extends IQuickPickItem> extends QuickInput implements IQuickPi
702702
}
703703

704704
protected update() {
705-
this.ui.setVisibilities(this.canSelectMany ? { title: !!this.title || !!this.step, checkAll: true, inputBox: true, visibleCount: true, count: true, ok: true, list: true, message: !!this.validationMessage } : { title: !!this.title || !!this.step, inputBox: true, visibleCount: true, list: true, message: !!this.validationMessage, customButton: this.customButton, ok: this.ok });
706-
super.update();
707705
if (!this.visible) {
708706
return;
709707
}
708+
this.ui.setVisibilities(this.canSelectMany ? { title: !!this.title || !!this.step, checkAll: true, inputBox: true, visibleCount: true, count: true, ok: true, list: true, message: !!this.validationMessage } : { title: !!this.title || !!this.step, inputBox: true, visibleCount: true, list: true, message: !!this.validationMessage, customButton: this.customButton, ok: this.ok });
709+
super.update();
710710
if (this.ui.inputBox.value !== this.value) {
711711
this.ui.inputBox.value = this.value;
712712
}
@@ -860,11 +860,11 @@ class InputBox extends QuickInput implements IInputBox {
860860
}
861861

862862
protected update() {
863-
this.ui.setVisibilities({ title: !!this.title || !!this.step, inputBox: true, message: true });
864-
super.update();
865863
if (!this.visible) {
866864
return;
867865
}
866+
this.ui.setVisibilities({ title: !!this.title || !!this.step, inputBox: true, message: true });
867+
super.update();
868868
if (this.ui.inputBox.value !== this.value) {
869869
this.ui.inputBox.value = this.value;
870870
}

0 commit comments

Comments
 (0)