fix thread auto scroll
This commit is contained in:
parent
0fe3cbce62
commit
f9bf362935
|
@ -9,6 +9,7 @@ import { NotificationService, NewReplyData } from '../../../services/notificatio
|
|||
import { AccountInfo } from '../../../states/accounts.state';
|
||||
import { StatusWrapper } from '../../../models/common.model';
|
||||
import { StatusComponent } from '../status/status.component';
|
||||
import scrollIntoView from 'scroll-into-view-if-needed';
|
||||
|
||||
@Component({
|
||||
selector: 'app-thread',
|
||||
|
@ -177,11 +178,11 @@ export class ThreadComponent implements OnInit, OnDestroy {
|
|||
setTimeout(() => {
|
||||
const el = this.statusChildren.toArray()[position];
|
||||
el.isSelected = true;
|
||||
// el.elem.nativeElement.scrollIntoView({ behavior: 'smooth', block: 'nearest', inline: 'start' });
|
||||
// el.elem.nativeElement.scrollIntoView({ behavior: 'auto', block: 'start', inline: 'nearest' });
|
||||
// el.elem.nativeElement.scrollIntoView({ behavior: 'smooth', block: 'nearest', inline: 'start' });
|
||||
el.elem.nativeElement.scrollIntoViewIfNeeded({ behavior: 'auto', block: 'start', inline: 'nearest' });
|
||||
}, 0);
|
||||
|
||||
//el.elem.nativeElement.scrollIntoViewIfNeeded({ behavior: 'auto', block: 'start', inline: 'nearest' });
|
||||
|
||||
scrollIntoView(el.elem.nativeElement, { behavior: 'smooth', block: 'nearest'});
|
||||
}, 250);
|
||||
})
|
||||
.catch((err: HttpErrorResponse) => {
|
||||
this.notificationService.notifyHttpError(err, currentAccount);
|
||||
|
|
Loading…
Reference in New Issue