no message (#372)

This commit is contained in:
Chris-MS-896 2021-01-12 13:09:20 -06:00 committed by GitHub
parent af53697ff4
commit 3effbe6991
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 8 additions and 3 deletions

View File

@ -8,7 +8,7 @@ enum ScrollPosition {
export class AccessibleVerticalList {
private items: any[] = [];
private onSelect: (item: any) => void;
private onSelect?: (item: any) => void;
public currentItemIndex: ko.Observable<number>;
public currentItem: ko.Computed<any>;
@ -42,7 +42,9 @@ export class AccessibleVerticalList {
const targetElement = targetContainer
.getElementsByClassName("accessibleListElement")
.item(this.currentItemIndex());
if (targetElement) {
this.scrollElementIntoContainerViewIfNeeded(targetElement, targetContainer, ScrollPosition.Top);
}
return false;
}
if (event.keyCode === 40) {
@ -52,7 +54,9 @@ export class AccessibleVerticalList {
const targetElement = targetContainer
.getElementsByClassName("accessibleListElement")
.item(this.currentItemIndex());
this.scrollElementIntoContainerViewIfNeeded(targetElement, targetContainer, ScrollPosition.Bottom);
if (targetElement) {
this.scrollElementIntoContainerViewIfNeeded(targetElement, targetContainer, ScrollPosition.Top);
}
return false;
}
return true;

View File

@ -59,6 +59,7 @@
"./src/Explorer/Notebook/NotebookComponent/types.ts",
"./src/Explorer/Notebook/NotebookContentItem.ts",
"./src/Explorer/Notebook/NotebookUtil.ts",
"./src/Explorer/Tree/AccessibleVerticalList.ts",
"./src/Explorer/Panes/PaneComponents.ts",
"./src/Explorer/Panes/Tables/Validators/EntityPropertyNameValidator.ts",
"./src/Explorer/Panes/Tables/Validators/EntityPropertyValidationCommon.ts",