mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-02-02 09:35:40 -05:00
Merge from vscode c58aaab8a1cc22a7139b761166a0d4f37d41e998 (#7880)
* Merge from vscode c58aaab8a1cc22a7139b761166a0d4f37d41e998 * fix pipelines * fix strict-null-checks * add missing files
This commit is contained in:
@@ -201,7 +201,7 @@ export class InputBox extends Widget {
|
||||
|
||||
const onSelectionChange = Event.filter(domEvent(document, 'selectionchange'), () => {
|
||||
const selection = document.getSelection();
|
||||
return !!selection && selection.anchorNode === wrapper;
|
||||
return selection?.anchorNode === wrapper;
|
||||
});
|
||||
|
||||
// from DOM to ScrollableElement
|
||||
@@ -375,7 +375,7 @@ export class InputBox extends Widget {
|
||||
}
|
||||
|
||||
private updateScrollDimensions(): void {
|
||||
if (typeof this.cachedContentHeight !== 'number' || typeof this.cachedHeight !== 'number') {
|
||||
if (typeof this.cachedContentHeight !== 'number' || typeof this.cachedHeight !== 'number' || !this.scrollableElement) {
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -383,8 +383,8 @@ export class InputBox extends Widget {
|
||||
const height = this.cachedHeight;
|
||||
const scrollTop = this.input.scrollTop;
|
||||
|
||||
this.scrollableElement!.setScrollDimensions({ scrollHeight, height });
|
||||
this.scrollableElement!.setScrollPosition({ scrollTop });
|
||||
this.scrollableElement.setScrollDimensions({ scrollHeight, height });
|
||||
this.scrollableElement.setScrollPosition({ scrollTop });
|
||||
}
|
||||
|
||||
public showMessage(message: IMessage, force?: boolean): void {
|
||||
@@ -397,7 +397,7 @@ export class InputBox extends Widget {
|
||||
dom.addClass(this.element, this.classForType(message.type));
|
||||
|
||||
const styles = this.stylesForType(this.message.type);
|
||||
this.element.style.border = styles.border ? `1px solid ${styles.border}` : null;
|
||||
this.element.style.border = styles.border ? `1px solid ${styles.border}` : '';
|
||||
|
||||
// ARIA Support
|
||||
let alertText: string;
|
||||
@@ -507,9 +507,9 @@ export class InputBox extends Widget {
|
||||
dom.addClass(spanElement, this.classForType(this.message.type));
|
||||
|
||||
const styles = this.stylesForType(this.message.type);
|
||||
spanElement.style.backgroundColor = styles.background ? styles.background.toString() : null;
|
||||
spanElement.style.backgroundColor = styles.background ? styles.background.toString() : '';
|
||||
spanElement.style.color = styles.foreground ? styles.foreground.toString() : null;
|
||||
spanElement.style.border = styles.border ? `1px solid ${styles.border}` : null;
|
||||
spanElement.style.border = styles.border ? `1px solid ${styles.border}` : '';
|
||||
|
||||
dom.append(div, spanElement);
|
||||
|
||||
@@ -586,17 +586,17 @@ export class InputBox extends Widget {
|
||||
}
|
||||
|
||||
protected applyStyles(): void {
|
||||
const background = this.inputBackground ? this.inputBackground.toString() : null;
|
||||
const foreground = this.inputForeground ? this.inputForeground.toString() : null;
|
||||
const border = this.inputBorder ? this.inputBorder.toString() : null;
|
||||
const background = this.inputBackground ? this.inputBackground.toString() : '';
|
||||
const foreground = this.inputForeground ? this.inputForeground.toString() : '';
|
||||
const border = this.inputBorder ? this.inputBorder.toString() : '';
|
||||
|
||||
this.element.style.backgroundColor = background;
|
||||
this.element.style.color = foreground;
|
||||
this.input.style.backgroundColor = background;
|
||||
this.input.style.color = foreground;
|
||||
|
||||
this.element.style.borderWidth = border ? '1px' : null;
|
||||
this.element.style.borderStyle = border ? 'solid' : null;
|
||||
this.element.style.borderWidth = border ? '1px' : '';
|
||||
this.element.style.borderStyle = border ? 'solid' : '';
|
||||
this.element.style.borderColor = border;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user