fix the input box validation (#15634)

* fix the input box validation

* fix one more place
This commit is contained in:
Alan Ren
2021-06-08 14:24:50 -07:00
committed by GitHub
parent a61462a2c0
commit d91660b66f
9 changed files with 23 additions and 24 deletions

View File

@@ -342,7 +342,7 @@ class TunnelTreeRenderer extends Disposable implements ITreeRenderer<ITunnelGrou
inputBox,
dom.addStandardDisposableListener(inputBox.inputElement, dom.EventType.KEY_DOWN, (e: IKeyboardEvent) => {
if (e.equals(KeyCode.Enter)) {
if (inputBox.validate()) { // {{SQL CARBON EDIT}}
if (inputBox.validate() !== MessageType.ERROR) {
done(true, true);
} else {
done(false, true);
@@ -352,7 +352,7 @@ class TunnelTreeRenderer extends Disposable implements ITreeRenderer<ITunnelGrou
}
}),
dom.addDisposableListener(inputBox.inputElement, dom.EventType.BLUR, () => {
done(inputBox.validate(), true); // {{SQL CARBON EDIT}}
done(inputBox.validate() !== MessageType.ERROR, true);
}),
styler
];