fix column position shifting when switching column

This commit is contained in:
Nicolas Constant 2020-04-29 00:15:14 -04:00
parent 7dab421c26
commit 51709508f0
No known key found for this signature in database
GPG Key ID: 1E9F677FB01A5688
3 changed files with 4 additions and 4 deletions

View File

@ -261,7 +261,7 @@ export class StreamNotificationsComponent implements OnInit, OnDestroy {
} else {
element = this.notificationstream.nativeElement as HTMLElement;
}
element.focus();
element.focus({preventScroll:true});
}, 0);
return false;
}

View File

@ -306,7 +306,7 @@ export class StreamStatusesComponent implements OnInit, OnDestroy {
focus(): boolean {
setTimeout(() => {
var element = this.statustream.nativeElement as HTMLElement;
element.focus();
element.focus({preventScroll:true});
}, 0);
return false;
}

View File

@ -37,9 +37,9 @@ export class StreamsMainDisplayComponent implements OnInit, OnDestroy {
if (columnIndex > -1) {
setTimeout(() => {
let element = this.streamsElementRef.toArray()[columnIndex].nativeElement;
element.scrollIntoView({ behavior: 'smooth', block: 'nearest', inline: 'start' });
//element.scrollIntoView({ behavior: 'smooth', block: 'nearest', inline: 'start' });
const scrolling = <Promise<any>><any>scrollIntoView(element, { behavior: 'smooth', block: 'nearest'});
const scrolling = <Promise<any>><any>scrollIntoView(element, { behavior: 'smooth', block: 'nearest', inline: 'start'});
scrolling
.then(() => {
this.streamComponents.toArray()[columnIndex].focus();